A Streamlit-based web application that generates natural language summaries for code snippets using the fine-tuned Salesforce/CodeT5 model. Built as part of a course project for CIS 581: Advanced Software Engineering at California State University, Dominguez Hills.
Rahul Kavati Course: CIS 581 – Advanced Software Engineering Instructor: Dr. Alireza Izaddoost University: CSUDH
- Accepts source code in Python, Java, JavaScript, and other supported languages
- Uses
Salesforce/codet5-base-multi-sumto generate summaries - Clean two-column UI using Streamlit
- Useful for code documentation, onboarding, or reverse engineering
- Python 3.8+
- Recommended to use a virtual environment
pip install -r requirements.txtstreamlit run app.pyIf you encounter torch._C._get_custom_class_python_wrapper or file watcher errors:
streamlit run app.py --server.runOnSave=falsedef calculate_average(nums):
total = sum(nums)
count = len(nums)
return total / countExpected Summary:
Calculates the average of a list of numbers.
public boolean isEven(int num) {
return num % 2 == 0;
}Expected Summary:
Checks if a number is even.
def is_palindrome(s):
return s == s[::-1]Expected Summary:
Determines if a string is a palindrome.
- Model:
Salesforce/codet5-base-multi-sum - Architecture: Seq2Seq transformer
- Trained on: Multiple programming languages and summarization benchmarks
More info: https://huggingface.co/Salesforce/codet5-base-multi-sum
code_summarizer/
├── app.py # Streamlit UI
├── summarizer.py # Model logic
├── requirements.txt # Python dependencies
└── README.md # This file
- Add support for LLMs like CodeLLaMA or StarCoder
- Include side-by-side code explanation and visualization
- Add file upload support