El Plan STEM is a Django-based web application that combines the excitement of Formula 1 with engaging, AI-powered STEM education. Whether you're a student learning physics through lap times or an F1 enthusiast curious about race analytics, this project delivers a powerful, interactive experience.
- Teaches STEM concepts (Science, Technology, Engineering, Mathematics) using real F1 data.
- Auto-generates quiz-style questions based on:
- Lap times
- Pit stops
- Driver statistics
- Evaluates answers with explanations using Formula 1 analogies.
- Maintains conversational history for context-rich feedback.
- Chat with a bot to retrieve real-time facts and data about drivers, races, and circuits.
- Uses semantic vector search with sentence embeddings for intelligent query handling.
- Lets users create, save, and manage notes for studying or strategy planning.
- Visualizes F1 data such as speed trends, pit stop frequencies, or momentum shifts.
- Backend: Django 5.2.1
- Database: MongoDB (via
django-mongodb-backend) - AI Integration: Google Gemini (Gemini 1.5 Flash)
- Machine Learning: scikit-learn, TensorFlow, sentence-transformers
- Frontend: Django templates + static files (CSS/JS)
- Chatbot uses Google's Gemini model for generating and evaluating questions.
- Semantic search powered by
sentence-transformersfor intelligent data retrieval. - ML models include:
turn_severity_rf_model.joblib: Turn severity predictionsmomentum_lstm_model.h5: Momentum analysisf1_momentum_model.h5: Momentum-based forecasting
El-Plan-STEM/
│
├── backend/
│ ├── core/ # General site logic
│ ├── chatbot/ # Chatbot and AI logic
│ ├── ml_models/ # Legacy ML code (merged into chatbot)
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, images
│ └── manage.py
├── requirements.txt
└── .env (your environment variables)
-
Install Python 3.11
-
Create virtual environment
py -3.11 -m venv venv
-
Activate the environment
.\venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run the server
cd backend python manage.py runserver -
Stop the server
ctrl + C
-
Deactivate the environment
deactivate
| Route | Description |
|---|---|
/chatbot/ |
Main chatbot interface |
/chatbot/chat/ |
Chat endpoint for educational bot |
/chatbot/general/ |
General F1 assistant UI |
/chatbot/general/chat/ |
General assistant chat endpoint |
/ |
Home page |
/about/ |
About the project |
Thanks to the teams behind:
- Google Generative AI
- Ergast's Formula 1 open datasets
- Django & MongoDB communities
"Learning STEM at full throttle with the power of Formula 1!"