This is a basic image captioning application using the ๐ Gemini Pro API Vision. It allows users to generate captions for uploaded images using the Gemini Pro model. ๐ธ๐ฎ
- Python 3.6 or later ๐
- pip (Python package installer) ๐ฆ
- An API key for the ๐ Gemini Pro API Vision (obtained from Google) ๐
-
Clone the repository:
git clone https://github.com/sathwik-3721/gemini-image-captioning-demo.git cd gemini-image-captioning-demo -
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory with your Google API key:GOOGLE_API_KEY=your_google_api_key_here
-
Run the Streamlit app:
streamlit run app.py
- Open the Streamlit app in your web browser. ๐
- Enter a caption or description in the input text box (optional). โ๏ธ
- Upload an image (supported formats: jpg, jpeg, png). ๐ผ๏ธ
- Click the "Generate Caption about image" button. ๐
- View the generated caption below the image. ๐
- Streamlit - Web framework for creating interactive web applications with Python. ๐๐ง
- Google Gemini Pro API Vision - Gemini Pro Vision API for generating content from images. ๐
This project is licensed under the MIT License - see the LICENSE file for details.๐
- Special thanks to Google for providing the Gemini Pro API .
Made by Sathwik Ramisetty with โค๏ธ | ยฉ 2023 All rights reserved.