This example uses FastAPI - one of the fastest Python frameworks available. FastAPI Official site
Install requirements using the package manager pip.
pip install -r requirements.txt
Initialize migration using alembic
cd app
alembic init
alembic revision -m "init"
alembic upgrade head
alembic revision -m "users and items" --autogenerate
alembic upgrade head
Or just run the following command once if you have alembic installed and versions of migrations seems to be updated so that you migrate database to create a local sqlite db
cd app
alembic upgrade head
To run the Application you have to use Gunicorn(ASGI)-compatible web-server. (Gunicorn is a Python WSGI HTTP Server for UNIX)
Hypercorn is used in below example
Make sure you are at root directory of the app and seeing something like this
~/FastApi$
hypercorn app/api.py:app --reload
Or you can use Intellij (Pycharm) to run the app

http://localhost:8000/docs
Transformers models are available at Hugging Face site
Links:
This example uses FastAPI - one of the fastest Python frameworks available. FastAPI Official site
Install requirements using the package manager pip.
pip install -r requirements.txt
Initialize migration using alembic
cd app
alembic init
alembic revision -m "init"
alembic upgrade head
alembic revision -m "users and items" --autogenerate
alembic upgrade head
Or just run the following command once if you have alembic installed and versions of migrations seems to be updated so that you migrate database to create a local sqlite db
cd app
alembic upgrade head
To run the Application you have to use Gunicorn(ASGI)-compatible web-server. (Gunicorn is a Python WSGI HTTP Server for UNIX)
Hypercorn is used in below example
Make sure you are at root directory of the app and seeing something like this
~/FastApi$
hypercorn app/api.py:app --reload
Or you can use Intellij (Pycharm) to run the app

http://localhost:8000/docs
Transformers models are available at Hugging Face site
Links: