Skip to content

Workshop material on deploying a Machine Learning web app with Flask and React

Notifications You must be signed in to change notification settings

McGillAISociety/Fall2020-Workshop3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

McGill AI Workshop 3

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

Slides

The slides for this workshop can be found here

Backend

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

Frontend

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

About

Workshop material on deploying a Machine Learning web app with Flask and React

Topics

Resources

Stars

Watchers

Forks