- model = distilbert-base-uncased-finetuned-sst-2-english
- task = sentiment-analysis
The fast_api.py
contains the code for deployment via FastAPI.
uvicorn --host 0.0.0.0 fast_api:app
curl -X POST -H "Content-Type: application/json" -d '{"text":"a beautiful rainy day."}' http://localhost:8000/predict
The flask_api.py
contains the code for deployment via Flask API.
python flask_api.py
curl -X POST -H "Content-Type: application/json" -d '["a beautiful rainy day."]' http://localhost:8080/predict