|
--- |
|
title: PunnyPix |
|
emoji: π’ |
|
colorFrom: yellow |
|
colorTo: indigo |
|
sdk: gradio |
|
sdk_version: 3.37.0 |
|
app_file: app.py |
|
pinned: false |
|
--- |
|
|
|
# π· PunnyPix πΈ |
|
|
|
π· Generate "funny" photo captions from images πΈ |
|
|
|
![text](punnypix.jpg) |
|
|
|
Select a photo, wait for the caption to appear, edit the caption as needed, and hit submit to generate a "funny" photo caption. Several sample photos are provided for convenience. |
|
|
|
## Running |
|
|
|
- To run locally, install requirements.txt, fill in .env, and run app.py, or |
|
|
|
- Try it at [huggingface.co/spaces/flobbit/punnypix](https://huggingface.co/spaces/flobbit/punnypix) |
|
|
|
Note: for now, the huggingface version uses free OpenAI credits, so it is rate limited, and sometimes takes forever to return a response. So, you are advised to enter your API key to avoid delays. |
|
|
|
## About |
|
Uses Langchain, Hugging Face transformers, OpenAI, Python. |
|
|
|
## Limitations |
|
This app is provided for entertainment purposes only. Sometimes the image to caption process doesn't produce a correct caption, so edit as needed. Sometimes the "funny" caption isn't so funny, but what can you expect for free? π |
|
|
|
## Credits |
|
A piece of the chat portion of the system comes from https://github.com/hwchase17/langchain-gradio-template with changes for this particular use case, and changes in langchain. |