Team Ai
Apppublic

maheshsmc/image-caption-decoder

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

๐Ÿ–ผ๏ธ Image Caption Generator with Decoding Strategies

This project is a Hugging Face + GitHub demo of an Image Caption Generator using the nlpconnect/vit-gpt2-image-captioning model.

๐Ÿš€ Features

  • โ€”Upload an image and generate captions
  • โ€”Supports multiple decoding strategies:
  • โ€”Greedy
  • โ€”Beam Search
  • โ€”Top-k Sampling
  • โ€”Top-p (Nucleus) Sampling

๐Ÿ“ฆ Installation

bash
pip install -r requirements.txt

โ–ถ๏ธ Run Locally

bash
streamlit run app.py

๐ŸŒ Deployment

  • โ€”Hugging Face Spaces (Streamlit): Upload all files
  • โ€”GitHub: Push repo for tracking + sharing

๐Ÿ“– Example

Greedy: a man riding a horse in the field Beam (5): a person on a horse riding in a grassy field Top-k: a rider sits proudly on a horse in the countryside Top-p: someone is on horseback, enjoying the open field