An interactive and AI-powered SGPA Calculator that extracts subject scores from report card images and computes your Semester Grade Point Average (SGPA) dynamically.
- 📷 Image Upload: Drag & drop, click to upload, or paste an image of your report card.
- 🎯 AI-Powered OCR: Uses Google's Gemini API to extract subject names, codes, and total marks from the image.
- 🔢 Automatic Credit Assignment: Dynamically fetches course credits from an online dataset.
- 📉 SGPA Calculation: Computes SGPA using the extracted marks and corresponding credits.
- 🎨 Interactive UI: Built using React and Tailwind CSS for a seamless experience.
- 🔔 Toasts & Notifications: User-friendly feedback using
sonner.
git clone https://github.com/yourusername/sgpa-calculator.git
cd sgpa-calculatornpm installCreate a .env.local file and add your Google Gemini API key:
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key_herenpm run devThe app will be available at http://localhost:3000.
- Upload Image: Drag & drop or select an image containing your subject marks.
- Processing: The app extracts text using AI and matches subjects with credits.
- SGPA Calculation: The system computes SGPA based on marks and corresponding credits.
- Results: The final SGPA and extracted subject details are displayed interactively.
SGPA is calculated using:
SGPA = ( Σ (Grade Point × Credits) ) / ( Σ Credits )
| Marks Range | Grade Point |
|---|---|
| 90-100 | 10 |
| 80-89 | 9 |
| 70-79 | 8 |
| 60-69 | 7 |
| 50-59 | 6 |
| 45-49 | 5 |
| 40-44 | 4 |
| <40 | 0 |
- Frontend: React, Tailwind CSS
- AI Model: Google Gemini API
- State Management: useState, useEffect
- Notifications:
sonner
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch - Make your changes and commit:
git commit -m "Added new feature" - Push to your fork:
git push origin feature-branch - Open a Pull Request 🎉
- Live Demo: Smart SGPA Calculator
- Report Issues: GitHub Issues
- Course Credits Dataset: GitHub Raw Data
🚀 Happy Calculating!