Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.6.0
metadata
title: Image Captioning with BLIP
emoji: 🖼️
colorFrom: blue
colorTo: indigo
sdk: gradio
app_file: app.py
pinned: false
Image Captioning with BLIP
This project uses the Salesforce BLIP model to generate captions for images. It provides a simple web interface built with Gradio to upload an image and view the generated caption.
Setup
Clone the repository:
git clone https://huggingface.co/spaces/electro-sb/image_captioning cd image_captioningInstall dependencies:
pip install -r requirements.txtSet up your Hugging Face token: Create a
.envfile in the root of the project and add your Hugging Face API key:HF_API_KEY=<your-hugging-face-api-key>Run the application:
python app.pyThe application will be available at
http://localhost:7860.
Usage
- Open your web browser and navigate to
http://localhost:7860. - Upload an image using the provided interface.
- Click the "Caption" button to generate a caption for the image.
- The generated caption will be displayed in the "Caption" textbox.