This workshop will cover the basics on:
- Creating a flask backend with a pytorch model
- Creating REST endpoints in flask for clients to call
- Create a reactjs frontend
- Having the frontend call the backend for predictions
The slides for this workshop can be found here
The backend is written in Flask and requires a Python version of 3.8+
We provide below 3 different ways of installing the needed dependencies to run the Flask app. Please run the following commands from within the backend folder
- Using pip:
pip install -r requirements.txt
- Using Pipenv:
pip install pipenv
pipenv shell
pipenv install
- Using Conda:
conda env create -f environment.yml
For more info about creating and managing Conda environments, please refer to this link
The frontend was instantiated using the following command
npm init react-app frontend
Since this has already been done here's what you need to do to run the frontend
cd frontend
npm install
npm start