Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Derek Haynes 0faf9c3f4e
Updating README
4 years ago
..
2c439edc16
Removing PORT
4 years ago
0faf9c3f4e
Updating README
4 years ago
4b89d312ed
Removing custom json.dumps() as NaNs have been fixed
4 years ago
3b6158dce4
Updating raw data to remove NaN values
4 years ago
12351f0290
Initial setup of FastAPI web app
4 years ago
1c8d4c4a9a
Using gunicorn to serve app
4 years ago
12351f0290
Initial setup of FastAPI web app
4 years ago

README.md

You have to be logged in to leave a comment. Sign In

Covid19-Repo-Recommender Web app

This web app creates an HTTP API for model inference.

Setup

python3 -m venv covid19-rec-web
source covid19-rec-web/bin/activate
pip install -r requirements.txt

The web app has a different set of requirements than training.

Running the web app

uvicorn main:app --reload

Model Inference API

curl --location --request POST 'http://localhost:8000/predict' \
--header 'Content-Type: application/json' \
--data-raw '{"columns":[0,1],"index":[0],"data":[["Python","Data"]]}'

Deploying to Heroku

heroku create
git push heroku master
heroku buildpacks:set https://github.com/timanovsky/subdir-heroku-buildpack
heroku buildpacks:add heroku/python
heroku config:set PROJECT_PATH=web_app

As web_app is contained with a mono-repo related to the Covid19-Repo-Recommender project, we need to tell Heroku to set the project path to the /web_app directory vs. the default (the root directory). The subdir buildpack and PROJECT_PATH env var are used for this. Setup based on this SO response.

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...