This project integrates a backend built with Flask and TensorFlow and a frontend developed using React. It allows admins to manage machine learning models and pipelines while offering predictions on student persistence based on input data.
- Admin Model Management: Add, view, and switch between multiple models and pipelines.
- Student Persistence Prediction: Provides predictions based on student data.
- Secure Access: Admin pages are protected and accessible only after login.
Follow the instructions below to set up and run the application.
- Python (>= 3.8)
- Node.js (>= 14.x)
- npm (comes with Node.js)
-
Navigate to the Backend Directory
Open a terminal and move into thebackendfolder:cd backend -
Create a Virtual Environment
Create an isolated Python environment:python -m venv venv
-
Activate the Virtual Environment
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install Dependencies
Install the required Python packages:pip install -r requirements.txt
-
Add Models and Pipelines
- Save
.kerasfiles for TensorFlow models in thebackend/model/folder. - Save
.pklfiles for pipelines in thebackend/pipeline/folder.
- Save
-
Start the Backend Server
Run the Flask app:python app.py
The backend will be available at
http://127.0.0.1:5000.
-
Navigate to the Frontend Directory
Open a terminal and move into thefrontendfolder:cd frontend -
Install Dependencies
Install the necessary Node.js packages:npm install
-
Start the Frontend Server
Run the React development server:npm start
The frontend will be available at
http://localhost:3000.
-
Login
Navigate to the homepage (/) and log in using the provided credentials. -
Manage Models and Pipelines
Access/adminto:- View available models and pipelines.
- Switch between models and pipelines.
- Upload new models (
.keras) and pipelines (.pkl).
-
Add Models and Pipelines
- Save new models to
backend/model/. - Save new pipelines to
backend/pipeline/.
- Save new models to
- Access the prediction form at
/predict. - Fill in the required student data fields.
- Submit the form to receive predictions on student persistence.
StudentPersistencePredictor/
├── backend/
│ ├── app.py # Flask app entry point
│ ├── model/ # Folder for TensorFlow models (.keras)
│ ├── pipeline/ # Folder for pipelines (.pkl)
│ ├── requirements.txt # Backend dependencies
│ └── ...
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── styles/ # CSS files
│ │ └── ...
│ ├── package.json # Frontend dependencies
│ └── ...
└── README.md # Project documentation
cd backend
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
python app.pycd frontend
npm install
npm start- Flask
- TensorFlow
- Joblib
- Pandas
- Scikit-learn
- React
- Axios
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.