This repository contains the code for React Web App with Flask Backend for PyTorch Model Session and is a part of the Full stack AI Love Coding Series at CellStrat AI Lab.
In this part, the BERT model that was trained in part 1 is wrapped around a React Frontend and Flask Backend for inference.
Checkout the code from the other parts here:
- Clone the repository
git clone https://github.com/theneuralbeing/bert-web-app.git
-
Install the required python libraries by running
pip install -r requirements.txt
. -
Install
node.js
for running the react application. -
Download the trained sentiment analysis model inference.pth file.
-
Move the downloaded
pth
file to the backend directory. -
Setup your react app by running
npm install
from the bert-app directory. -
Start your react app with
npm start
in the terminal. -
Open another terminal and
cd
to backend directory and start the flask server using this commandpython app.py
. -
Now you can play around with your sentiment analysis web app.