EduPredict Pro Student Performance Prediction System with 4 Portals | ML Final Year Project
Back to ProjectGive yourself about 20 minutes the first time. Most of that is npm downloading things. Follow the order below exactly, because step 3 will fail if you skip step 2.
python --version. If it says 2.7 or "command not found," go to python.org and install 3.10 or 3.11. On Windows, tick the "Add Python to PATH" checkbox during install - forgetting this causes about half the setup problems we get asked about.node --version. If it's missing, grab the LTS build from nodejs.org. npm comes bundled with it, so you don't need to install that separately.Extract the project folder somewhere sensible. Not inside a OneDrive or Google Drive synced folder, because the sync process locks files mid-write and causes weird errors. Then open a terminal in that folder and run:
cd Student-Performance-Prediction
pip install -r backend/requirements.txt
This pulls in Flask, Flask-SQLAlchemy, Flask-JWT-Extended, Flask-Migrate, Flask-CORS, scikit-learn, pandas and a few others. It'll take a couple of minutes. scikit-learn is the big one.
python backend/ml/train_model.py
Watch the terminal. You should see the MAE, RMSE and R-squared printed out, plus the feature importance breakdown. Two files get created in backend/ml/ - rf_model.pkl and scaler.pkl. If you don't see those files afterwards, something went wrong here and there's no point continuing.
On macOS or Linux:
FLASK_APP=backend.wsgi:app flask db upgrade
python backend/seed.py
On Windows Command Prompt, set the variable separately first:
set FLASK_APP=backend.wsgi:app
flask db upgrade
python backend/seed.py
The seeder creates the four demo accounts along with sample students, subjects, attendance records and marks. Without this you'll have a working app with a completely empty database, which is a confusing way to spend twenty minutes wondering what broke.
cd frontend
npm install
cd ..
Go make chai. This one takes a while.
You need two terminals open at the same time. Not one after the other. Both, simultaneously.
Terminal 1 - the backend:
python app.py
The API comes up at http://localhost:5001. Leave this terminal alone.
Terminal 2 - the frontend:
cd frontend
npm run dev
Open http://localhost:5173 in your browser and you should see the login screen.
Change these before you submit anything, obviously.
Every API request fails with a CORS or network error. The backend isn't running, or it's on the wrong port. Check Terminal 1 hasn't crashed. On macOS, AirPlay Receiver squats on port 5001 by default - either turn it off in System Settings under General and AirDrop, or change the port inside app.py and update the base URL in frontend/src/api to match.
"No such table" errors when you log in. The migration didn't run. Go back to step 3, make sure FLASK_APP is actually set, and run flask db upgrade again. Then run the seeder.
Prediction button returns a 500 error. The pickle files are missing. Rerun step 2 and confirm rf_model.pkl and scaler.pkl exist in backend/ml/.
If all four of those work, the full stack is wired correctly - database, API, auth, model, frontend. You're done.
Our team is here to assist you with installation and setup.