Skip to content

Currybon30/student-persistence-predictor

Repository files navigation

Student Persistence Predictor

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.


Features

  • 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.

Getting Started

Follow the instructions below to set up and run the application.

Prerequisites

  • Python (>= 3.8)
  • Node.js (>= 14.x)
  • npm (comes with Node.js)

Backend Setup

  1. Navigate to the Backend Directory
    Open a terminal and move into the backend folder:

    cd backend
  2. Create a Virtual Environment
    Create an isolated Python environment:

    python -m venv venv
  3. Activate the Virtual Environment

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  4. Install Dependencies
    Install the required Python packages:

    pip install -r requirements.txt
  5. Add Models and Pipelines

    • Save .keras files for TensorFlow models in the backend/model/ folder.
    • Save .pkl files for pipelines in the backend/pipeline/ folder.
  6. Start the Backend Server
    Run the Flask app:

    python app.py

    The backend will be available at http://127.0.0.1:5000.


Frontend Setup

  1. Navigate to the Frontend Directory
    Open a terminal and move into the frontend folder:

    cd frontend
  2. Install Dependencies
    Install the necessary Node.js packages:

    npm install
  3. Start the Frontend Server
    Run the React development server:

    npm start

    The frontend will be available at http://localhost:3000.


Usage

Admin Model Management

  1. Login
    Navigate to the homepage (/) and log in using the provided credentials.

  2. Manage Models and Pipelines
    Access /admin to:

    • View available models and pipelines.
    • Switch between models and pipelines.
    • Upload new models (.keras) and pipelines (.pkl).
  3. Add Models and Pipelines

    • Save new models to backend/model/.
    • Save new pipelines to backend/pipeline/.

Prediction

  1. Access the prediction form at /predict.
  2. Fill in the required student data fields.
  3. Submit the form to receive predictions on student persistence.

Folder Structure

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

Commands Recap

Backend

cd backend
python -m venv venv
venv\Scripts\activate        # Windows
source venv/bin/activate     # macOS/Linux
pip install -r requirements.txt
python app.py

Frontend

cd frontend
npm install
npm start

Technologies Used

Backend

  • Flask
  • TensorFlow
  • Joblib
  • Pandas
  • Scikit-learn

Frontend

  • React
  • Axios

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages