This is a template of integrating a ML Model using React and Flask. This integration allows a React frontend to send data to the Flask backend, which in turn uses the ML model to perform predictions and returns the results back to the React UI.
To run this app locally on your PC, follow these steps :
- Clone this repository to your local machine :
git clone https://github.com/GouravDutta-01/react-flask.git
cd react-flask
- Make sure you have Python and NodeJs installed on your PC
- Install the required dependencies for the Flask API :
cd backend
pip install -r requirements.txt
cd ..
- Install the required dependencies for the React app :
cd frontend
npm install
cd ..
- Run the Flask API server :
cd backend
python app.py
- Run the React Web Application :
cd frontend
npm start
- Open your browser and visit http://localhost:3000 to access the react web application.