Skip to content

kkaarrss/qwen2_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

At least install fastapi uvicorn Pillow. Maybe more but I forgot what. Look at the error messages what is missing and install missing modules accordingly.

run: pip install transformers fastapi uvicorn Pillow --upgrade

run the service with: uvicorn qwen:app --host 0.0.0.0 --port 8000

To try it out with curl: convert image to base64:

base64 -i "IMAGE NAME HERE.jpg" -o test_base64.txt

Then run the curl command:

curl -X POST "http://localhost:8000/v1/completions" -H "Content-Type: application/json" -d '{ "messages": [ { "role": "user", "content": [ { "type": "image", "image": "'$(cat test_base64.txt)'" }, { "type": "text", "text": "Output the handwritten text from the image." } ] } ], "max_tokens": 50 }'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages