Skip to content

arulbenjaminchandru/01-Gemini-Pro-Vision

Repository files navigation

Gemini Pro Vision Image Recognition with Streamlit

This repository contains a Streamlit application that uses the Gemini Pro Vision API to recognize and describe the content of an uploaded image based on a customizable prompt text box.

Features

  • Upload an image and get a description based on a prompt.
  • Customize the prompt to get specific descriptions.
  • Simple and user-friendly web interface.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/gemini-pro-vision-streamlit.git
    cd gemini-pro-vision-streamlit
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  4. Install the dependencies:

    pip install -r requirements.txt

Configuration

  1. Create a .env file in the root directory of the project and add your Gemini Pro Vision API key:
    GEMINI_API_KEY=your_gemini_api_key_here

Usage

  1. Run the Streamlit application:

    streamlit run app.py
  2. Open your web browser and go to http://localhost:8501 to view the application.

  3. Upload an image and enter a prompt to get a description based on the prompt.

Code Overview

The main components of the application are:

  • app.py: The main application file that contains the Streamlit code.
  • requirements.txt: The file that lists the Python dependencies for the project.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published