Spaces:
Running
on
Zero
Running
on
Zero
title: Describe And Generate Game | |
emoji: π¨πΌοΈβ‘οΈπβ‘οΈποΈβ¨ | |
colorFrom: blue | |
colorTo: green | |
sdk: gradio | |
sdk_version: 4.41.0 | |
app_file: app.py | |
pinned: false | |
license: afl-3.0 | |
# Describe-and-Generate Game ποΈ | |
This application is an interactive "Describe-and-Generate" game that leverages advanced AI models to generate creative images based on the captions derived from an initial uploaded image. | |
## How It Works | |
1. **Image Captioning**: The app uses the `Salesforce/BLIP-IMAGE-CAPTIONING-BASE` model to generate a descriptive caption from the uploaded image. | |
2. **Image Generation**: The app then feeds this caption into the `runwayml/stable-diffusion-v1-5` model, which generates a new image based on the caption. | |
## Features | |
- **Upload an Image**: Start by uploading an image of your choice. | |
- **Caption Generation**: The app will automatically generate a caption describing the uploaded image. | |
- **Image Generation**: Based on the generated caption, the app will create a new, AI-generated image. | |
- **Interactive Interface**: Built using Gradio, the interface is simple and user-friendly, allowing you to experiment with different images and see the AI's creative output. | |
## Models Used | |
- **Captioning Model**: [SALESFORCE/BLIP-IMAGE-CAPTIONING-BASE](https://huggingface.co/Salesforce/blip-image-captioning-base) | |
- **Image Generation Model**: [RUNWAYML/STABLE-DIFFUSION-V1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) | |
## Software Packages | |
- **Gradio**: Used to create the interactive web interface. | |
- **Transformers**: Used for the image captioning model. | |
- **Diffusers**: Used for the image generation model. | |
- **Spaces**: Utilized for GPU acceleration during model execution. | |
## How to Use | |
1. **Upload an Image**: Use the "Your first image" button to upload any image. | |
2. **Generate**: Click the "Caption and generate" button. | |
3. **View Results**: The app will display the generated caption and the new image created based on that caption. |