- python 3.10 and above
- pip package manager for python
- docker
-
Clone repository and cd into folder
-
Create virtual environment by:
python -m venv venv
-
Activate it:
for shell prompt
source venv/bin/activate
for fish prompt
source venv/bin/activate.fish
-
Install requirements:
pip install -r requirements.txt
or
make install
-
Run application:
python -m uvicorn app.main:app --reload
-
Application should be ready on port 8000
make docker-build
docker run -p 8000:8080 fastapi
After that you should be able to access app on port 8000
make test
curl -d '{"text": "It was a {adjective} day. I went downstairs to see if I could {verb} dinner. I asked, \\"Does the stew need fresh {noun}.\\"" }' -H "Content-Type: application/json" -X POST "http://0.0.0.0:8000/madlib"