step to run backend to local
-
create environment use command
python -m venv env
-
activate a environment
- windows
./env/Scripts/activate
- Mac
source ./env/bin/activate
-
install library from requirements.txt use command
pip install -r requirements.txt
-
create a file
.env
in ./ folder and add OPENAI_KEY -
use command
uvicorn main:app --reload
to run fastapi in your local
docker run -d --name test-api-con -p 8000:8000 -e OPANAI_KEY test-api