InsightLearn is an AI-powered EdTech tool that analyzes student explanations to determine if they truly understand a topic or are merely memorizing. It uses NLP via Hugging Face APIs to classify responses as Understood, Memorized, or Confused — helping students self-evaluate and educators gain insight into learner comprehension.
- Backend: Flask (Python), Flask-WTF, Flask-Login, Flask-Mail
- Frontend: HTML, CSS, Bootstrap 4 , JavaScript, Jinja2
- Database: PostgreSQL via SQLAlchemy
- ML API: Hugging Face Transformers (Zero-Shot Classification via API)
insightlearn/
├── app/
│ ├── auth/ # Authentication Blueprint (login, register, reset)
│ ├── nlp/ # NLP Blueprint (text classification)
│ ├── static/ # static files
│ ├── templates/
│ │ ├── auth/ # Auth pages
│ │ ├── nlp/ # NLP pages (index, result)
│ │ ├── partials/ # Navbar, sidebar, footer
│ │ └── base.html # Common layout
│ ├── models.py # SQLAlchemy models
│ ├── forms.py # WTForms for auth
│ └── __init__.py # Flask app factory
├── run.py # Entry point
├── .env # Environment variables
├── .flaskenv # Flask environment config
├── requirements.txt # Python dependencies
└── README.md # Project overview
git clone https://github.com/your-username/insightlearn.git
cd insightlearnpython -m venv venv
venv\Scripts\activate # Windows
# or
source venv/bin/activate # macOS/Linux
pip install -r requirements.txtSECRET_KEY=your_secret_key
DATABASE_URL=postgresql://username:password@localhost:5432/insightlearn
HF_API_KEY=your_huggingface_api_key
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USERNAME=your_email
MAIL_PASSWORD=your_email_password
MAIL_DEFAULT_SENDER=your_emailflask shell
>>> from app import db
>>> db.create_all()
>>> exit()flask runThe application will be available at http://localhost:5000
- User Authentication (Register, Login, Password Reset via Email)
- Text-based explanation analysis using Hugging Face zero-shot classification
- Classification into: Understood, Memorized, Confused
- AdminLTE UI integration (Responsive layout)
- Save all explanation attempts in DB with timestamp
- Display user progress history via charts
- Show confidence scores and NLP-based recommendations
- Subject-specific prompt suggestions for better input
- Voice Input: Transcribe spoken explanation using WebRTC or browser speech recognition
- Facial Emotion Analysis via webcam to infer hesitation or confusion
- Fuse text + tone + expression for better classification accuracy
- Admin view of user statistics and comprehension
- Flag students needing intervention
- Weak-topic detection and progress tracking
- Exportable reports for individual learners
- Gamification for consistent engagement
- Real-time chat feedback from AI tutor
- Offline export of session reports (PDF/CSV)
- Adaptive content based on misunderstanding patterns
- Python 3.8+
- PostgreSQL 12+
- Hugging Face API Key
- Email account for SMTP (Gmail recommended)
- Create account at Hugging Face
- Generate API key from Settings → Access Tokens
- Add to
.envasHF_API_KEY
For Gmail SMTP:
- Enable 2-factor authentication
- Generate app-specific password
- Use app password as
MAIL_PASSWORDin.env
Database Connection Error
# Check PostgreSQL service is running
# Verify DATABASE_URL format
# Ensure database existsHugging Face API Error
# Verify API key is correct
# Check internet connection
# Ensure API quota not exceededEmail Not Sending
# Verify SMTP settings
# Check email credentials
# Ensure less secure apps enabled (Gmail)Pull requests and suggestions are welcome! For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request