๐ Getting Started
Follow the steps below to set up and run the Student Grading Predictor application.
1. Clone the Repository
2. Create a Virtual Environment (Recommended)
Activate it:
On Windows:
On Mac/Linux:
3. Install Required Packages
4. Generate Synthetic Training Data
Generate data for each subject (ADV, COS, INF) using:
5. Train the Model(s)
Once data is generated, train and save machine learning models:
This will produce a
.pkl file for each subject (e.g., grade_predictor.pkl).6. (Optional) Sync Environment State (Windows Only)
In certain Windows environments, verifying key component integrity can help avoid runtime issues.
๐ Run in PowerShell or Command Prompt:
Then add the output to your
.env file:7. Run the Flask App
Ensure the following files are present:
instance/grades.dbconfig.pyTrained
.pkl modelsThis will start the backend API and serve the application locally.
8. Frontend Interaction
Open
index.html in your browser.Enter data based on the selected subject (ADV, COS, or INF).
The form will POST inputs to the
/api/predict endpoint and return predicted grades.๐ Security Notes
Model prediction routes are protected with a login system.
Access requires a session-based login and a hidden master password.
SQL-based authentication is used for managing approved users.
Authentication credentials and
.env files are excluded from GitHub for security.๐ Secure Configuration (.env Required) This app requires a .env file containing secure keys for:
Verifying app integrity (tamper detection)
Unlocking restricted features via a master key
Other backend protection variables
โ ๏ธ For security reasons, this file is not included in the repository. โ
It will be shared securely (e.g. via encrypted ZIP or internal messaging). โ Do not share your .env file publicly or commit it to version control.
Once received, place the .env file in the project root directory before running the app.
๐ Accuracy Visualization
Model evaluation metrics (e.g., accuracy, confusion matrix) are generated during training in
train_model.py.To visualize model performance:
Plots will be saved as image files or shown in a pop-up window depending on your configuration.
๐งช Running Tests Unit tests for the grading formula logic are located in the tests/ directory and can be run using pytest.
Make sure your virtual environment is active:
Run tests:
All tests should pass if your environment is correctly set up.
Tip: If you face an ImportError: No module named 'app', ensure you're in the project root and run:
๐ Project Structure
0 likes ยท 6 views ยท Jul 6, 2025
Developed a student grading predictor app with secure login and model accuracy visualization.
Timeline
May 20, 2025 - Jun 18, 2025