- Clone the Respository
cd fastapi-indicparser-doctr
- Install all the packages
pip install -r packages.txt
- Run app.py
uvicorn app:app --reload
- Send POST request
curl -X 'POST' \
'http://127.0.0.1:8000/indicparser' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@GK2_page-0280.jpg;type=image/jpeg' \
-F 'inference=no' \
-F 'lang=san_iitb'
curl -X 'POST' \
'http://127.0.0.1:8000/indicparser' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@GK2_page-0284.jpg;type=image/jpeg' \
-F 'inference=yes' \
-F 'lang=san_iitb' \
-F 'model=Sanskrit_PubLayNet_faster_rcnn' \
-F 'confidence_threshold=0.5'
curl -X 'POST' \
'http://127.0.0.1:8000/doctr?model=DocTR' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'File=@sample.jpeg;type=image/jpeg'