A Flask-based web application that processes student test performance data, generates personalized feedback using Google Gemini API, creates visualizations, and produces comprehensive PDF reports with actionable insights.
- Automated Data Processing: Parses JSON test data to extract comprehensive performance metrics
- AI-Powered Feedback: Generates personalized feedback using Google Gemini API
- Dynamic Visualizations: Creates interactive charts using Plotly for performance analysis
- PDF Report Generation: Produces structured reports with ReportLab integration
- Web Interface: User-friendly Flask application for file upload and report generation
- Backend: Flask, Python
- AI Integration: Google Gemini API (gemini-1.5-flash)
- Data Visualization: Plotly, Pandas
- PDF Generation: ReportLab
- File Processing: JSON parsing with comprehensive data extraction
The generated PDF report includes:
- Introduction & Overview: Personalized motivational message with performance highlights
- Performance Analysis:
- Overall performance metrics
- Subject-wise breakdown
- Chapter-wise analysis
- Difficulty-level insights
- Concept-wise performance
- Time Management Analysis: Time vs accuracy correlation insights
- Actionable Recommendations: Data-driven suggestions for improvement
- Visual Analytics: Comprehensive charts and graphs on separate pages
- Python 3.8+
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd student-performance-analyzer
-
Create virtual environment
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
# Create .env file echo "GOOGLE_API_KEY=your-google-api-key" > .env
-
Install system dependencies (for chart rendering)
# Ubuntu/Debian sudo apt-get install libcairo2 libpango1.0-0 libgdk-pixbuf2.0-0 # macOS brew install cairo pango
-
Start the application
python app.py
-
Access the web interface
- Navigate to
http://localhost:5000
- Upload JSON test data file
- Preview generated statistics
- Download comprehensive PDF report
- Navigate to
The application leverages Google's Gemini 1.5 Flash model for generating contextual, personalized feedback. The AI analyzes performance patterns and provides:
- Personalized introductions highlighting strengths and improvement areas
- Detailed performance breakdowns across multiple dimensions
- Time management insights and recommendations
- Actionable, data-driven suggestions for academic improvement
Flask==2.3.2
google-generativeai==0.7.2
matplotlib==3.7.1
reportlab==4.2.2
markdown==3.4.3
python-dotenv>=1.0.1
pandas==2.2.2
plotly==5.24.0
kaleido==0.2.1
gunicorn==22.0.0
GOOGLE_API_KEY=your-google-gemini-api-key
SECRET_KEY=your-secret-key-for-dev
- Visit Google Cloud Console
- Enable the Gemini API
- Create credentials and obtain your API key
- Add the key to your
.env
file
The application expects JSON input with the following structure:
- Overall performance metrics
- Subject-wise breakdown
- Individual question details with chapters, difficulty levels, and concepts
- Time tracking data
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please ensure your code follows PEP 8 style guidelines and includes appropriate documentation.
Thank you for using Student Performance Feedback Report Generator!
Hoping this tool helps educators and students gain valuable insights into academic performance.