gradio_with_fastapi / README.md
alessandro trinca tornidor
[refactor] add packages.txt, remove unused section from README.md
53b5c95
|
raw
history blame
937 Bytes
metadata
title: Gradio With Fastapi
emoji: 
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 4.32.2
app_file: app.py
pinned: false
license: mit

Gradio plus FastAPI with UUID logging sessions

Run the app in a virtual environment

  1. create and activate a virtual environment
  2. install the dependencies
  3. execute the uvicorn webserver
# create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# install the project dependencies
python -m pip install pip --upgrade
python -m pip install -r requirements.txt
# execute the uvicorn webserver. In case of problem try WITHOUT the absolute path or uvicorn could not find the module
# check that env $PATH contains the current virtualenv `venv/bin` folder
# also try using a relative path, e.g. `./venv/bin/uvicorn` or reinstalling the virtualenv
# fastapi==0.110.0, uvicorn==0.27.1
uvicorn app:app --host 0.0.0.0 --port 7860 --reload