How sectechsociety/smart-study-plan-generator works
Purpose and Entry Points
This is a local Streamlit application that creates personalized weekly study plans. It combines ANN-based total-hour prediction, difficulty-weighted allocation, availability-constrained timetable generation, SQLite persistence, and per-user authentication.
Primary runtime entry point: smart-study-plan-generator-complete/app.py.
Model training/export entry point: smart-study-plan-generator-complete/train_and_export_model.py.
Streamlit Application Orchestration
app.py is the application boundary between user input and planning services. It collects CGPA targets, dynamically defined subjects and difficulty levels, and weekly available time slots; it also presents generated plans and persisted plan history.
Relevant paths:
• smart-study-plan-generator-complete/app.py
• smart-study-plan-generator-complete/auth.py
• smart-study-plan-generator-complete/database.py
Authentication and User Isolation
Authentication is implemented separately and backed by SQLite. Signup/login establishes the user identity used to scope saved and retrieved study plans, preventing one user’s historical plans from appearing in another’s view.
Relevant paths:
• smart-study-plan-generator-complete/auth.py
• smart-study-plan-generator-complete/database.py
• smart-study-plan-generator-complete/study_planner.db
ML Prediction Boundary
The planner predicts a single total weekly study-hours value from current and target CGPA. At runtime, the application consumes a pre-exported TensorFlow/Keras H5 artifact. If the artifact or ML runtime is unavailable, the system has rule-based fallback behavior rather than blocking plan creation.
Relevant paths:
• smart-study-plan-generator-complete/model/total_hours_model.h5
• smart-study-plan-generator-complete/app.py
• smart-study-plan-generator-complete/train_and_export_model.py
Training and Data Pipeline
Offline training reads synthetic academic data, trains the total-hours neural network, and exports the inference artifact consumed by the Streamlit application. Training is operationally distinct from the interactive request path.
Relevant paths:
• smart-study-plan-generator-complete/train_and_export_model.py
• smart-study-plan-generator-complete/data/synthetic_full.csv
• smart-study-plan-generator-complete/model/total_hours_model.h5
Planning and Scheduling Flow
The central flow is: authenticated user input → total-hours prediction/fallback → subject-hour distribution weighted by subject difficulty → slot-level weekly timetable. The scheduler has a two-stage constraint policy: first allocate at least one slot to every subject, then use remaining availability proportionally by difficulty. Scheduling is bounded by user-selected time slots, so allocated study intent must be reconciled with finite calendar capacity.
Relevant paths:
• smart-study-plan-generator-complete/app.py
• smart-study-plan-generator-complete/model/total_hours_model.h5
Persistence and Runtime Dependencies
SQLite is the persistent system of record for credentials and generated-plan history, including retrieval of the latest timetable after later login. The application is intended for local Python 3.9–3.11 execution through Streamlit; TensorFlow/Keras supports training and model inference. Dependency declarations are in smart-study-plan-generator-complete/requirements.txt.
Relevant paths:
• smart-study-plan-generator-complete/database.py
• smart-study-plan-generator-complete/study_planner.db
• smart-study-plan-generator-complete/requirements.txt
Main entry points: app.py Streamlit app · database.py Database access · train_and_export_model.py Model training/export · total_hours_model.h5 Total-hours model
Components 13
Interactive Application
- Streamlit app · Collects inputs, creates plans, and shows history.
smart-study-plan-generator-complete/app.py - Authentication · Establishes the identity used to isolate plans.
smart-study-plan-generator-complete/auth.py - Student inputs · CGPAs, subjects, difficulty, and weekly slots.
smart-study-plan-generator-complete/app.py - Total-hours prediction · Predicts weekly study hours with a rule-based fallback.
smart-study-plan-generator-complete/app.py - Difficulty allocation · Distributes predicted hours across subjects by difficulty.
smart-study-plan-generator-complete/app.py - Weekly scheduler · Assigns every subject first, then fills remaining slots proportionally.
smart-study-plan-generator-complete/app.py - Plan history view · Displays saved plans for the logged-in user.
smart-study-plan-generator-complete/app.py
ML Pipeline
- Model training/export · Trains and exports the total-hours inference model offline.
smart-study-plan-generator-complete/train_and_export_model.py - Synthetic academic data
smart-study-plan-generator-complete/data/synthetic_full.csv - Total-hours model · Runtime inference artifact for weekly total hours.
smart-study-plan-generator-complete/model/total_hours_model.h5
Persistence
- SQLite database · Stores credentials and user-scoped generated plans.
smart-study-plan-generator-complete/study_planner.db - Database access
smart-study-plan-generator-complete/database.py
Other components
- Runtime dependencies · Declares Streamlit and TensorFlow/Keras runtime support.
smart-study-plan-generator-complete/requirements.txt
Connections 17
- Student inputs → Streamlit app: submits
- Streamlit app → Authentication: authenticates user
- Authentication → Database access: reads/writes credentials
- Streamlit app → Total-hours prediction: passes CGPAs
- Total-hours prediction → Total-hours model: loads for inference
- Total-hours prediction → Difficulty allocation: total weekly hours
- Difficulty allocation → Weekly scheduler: subject-hour targets
- Student inputs → Weekly scheduler: availability constraints
- Weekly scheduler → Database access: saves timetable by user
- Streamlit app → Plan history view: requests latest plans
- Plan history view → Database access: loads user-scoped history
- Database access → SQLite database: persists records
- Synthetic academic data → Model training/export: training input
- Model training/export → Total-hours model: exports
- Total-hours model → Total-hours prediction: unavailable: fallback
- Runtime dependencies → Streamlit app: supports runtime
- Runtime dependencies → Model training/export: supports training