Skip to content

A powerful web-based tool that uses Google's Gemini AI to transform your images with various effects, filters, and creative edits - all through a simple user interface.

License

Notifications You must be signed in to change notification settings

PierrunoYT/gemini-image-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini Image Analyzer

A powerful web-based tool that uses Google's Gemini AI to analyze your images, providing detailed descriptions, insights, and suggestions - all through a simple user interface.

🌟 Features

  • Web UI Interface: Easy-to-use interface with image preview
  • Multiple Image Upload: Process multiple images at once with the same style/prompt
  • Multiple Analysis Types: Choose from 10+ pre-defined analysis options
  • Custom Prompts: Ask specific questions about your images
  • Real-time Feedback: Get detailed AI-powered image analysis
  • Simple Setup: Works on Windows, Mac, and Linux

📋 Requirements

  • Python 3.7 or higher
  • Google Gemini API key (get one free at Google AI Studio)
  • Internet connection

🚀 Installation

Step 1: Get the code

git clone https://github.com/yourusername/gemini-image-editor.git
cd gemini-image-editor

Step 2: Set up a virtual environment

Windows

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate

macOS/Linux

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

Step 3: Install required packages

pip install -r requirements.txt

Step 4: Set up your API key

  1. Copy the example environment file:

    cp .env.example .env
  2. Edit .env and replace your_gemini_api_key_here with your actual Gemini API key.

🖥️ How to Use

Starting the Web Interface

# Ensure your virtual environment is activated
python gemini_webui.py

This will start a local web server at http://localhost:7860. Open this URL in your browser to access the interface.

Using the Web Interface

  1. Upload Images: Click the gallery area or drag and drop one or multiple images (max 10MB per image)
  2. Choose Analysis Type: Select from the dropdown menu or pick "none" to use only a custom prompt
  3. Enter a Custom Prompt (optional): For example, "What objects are in this image?"
  4. Click "Analyze Images": Wait a few seconds for Gemini to analyze your images
  5. View Results: Read Gemini's detailed analysis of your images

🎨 Available Analysis Types

Type Description
none Custom prompt only
describe Detailed description of the image
analyze Composition and element analysis
style Artistic style and technique identification
objects List of all visible objects
colors Color palette and mood analysis
text Text extraction and reading
quality Technical quality assessment
suggest Improvement suggestions
context Context and story interpretation
similar Description of similar images

💡 Example Prompts for Custom Analysis

  • "What emotions does this image convey?"
  • "Is this image suitable for a professional presentation?"
  • "What photography techniques were used?"
  • "Identify any potential copyright issues"
  • "What time of day was this photo taken?"
  • "Suggest ways to improve the composition"
  • "What story does this image tell?"
  • "Identify the location or type of environment"

🔧 Troubleshooting

API Key Issues

  • Double-check your API key in the .env file
  • Ensure you have the free Gemini API tier activated

Installation Problems

  • Make sure you're using Python 3.7+
  • Verify all packages are installed with pip list
  • If gradio installation fails, try: pip install --upgrade pip then reinstall

Image Processing Errors

  • Ensure images are in common formats (JPG, PNG)
  • Try with smaller images if you encounter timeouts
  • Check your internet connection

📝 Technical Notes

  • Uses the gemini-1.5-flash model for image analysis
  • Note: This tool analyzes images but does not generate or edit them
  • Free tier has usage limitations (check Google AI Studio for details)
  • Analysis quality varies based on image clarity and prompt specificity
  • Maximum file size: 10MB per image

🔒 Privacy

  • Images are processed through Google's Gemini API
  • Review Google's privacy policy for more information
  • No images are permanently stored by this application

📄 License

MIT License


Crafted with ❤️ for creative image enthusiasts

About

A powerful web-based tool that uses Google's Gemini AI to transform your images with various effects, filters, and creative edits - all through a simple user interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages