Skip to content

Python 3 API using OpenAI's CLIP model, generate top 5 image text descriptions

License

Notifications You must be signed in to change notification settings

lorenanicole/python-clip-ml-image-description-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-clip-ml-image-description-generator

Python 3 API using OpenAI's CLIP model, generate top 5 image text descriptions

Usage

  1. Install dependencies from requirements.txt e.g. pip install -r requirements.txt
  2. Start the FastAPI server with fastapi dev main.py, dev indicated running in development mode
  3. By default server is exposed on port 8000 e.g. curl 'http://127.0.0.1:8000', there's a Hello World test endpoint an optional name parameter to test 'curl 'http://127.0.0.1:8000/test?name=Lorena''
  4. To access docs use http://127.0.0.1:8000/docs
  5. To generate description an example curl is provided here:
curl \
  -X POST \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/lorena-selfie.png" \
  http://localhost:8000/description

Want to learn more?

About

Python 3 API using OpenAI's CLIP model, generate top 5 image text descriptions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages