Art-Historian-AI / README.md
gizemsarsinlar's picture
Update README.md
f710bd7 verified

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
metadata
title: AI Art Historian
emoji: 🎨
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.33.0
app_file: app.py
pinned: true
license: mit
short_description: Expert AI artwork analysis with historical insights
tags:
  - agent-demo-track

🎨 AI Art Historian

Expert-level artwork analysis powered by Microsoft Phi-3.5-Vision and SmolAgent Framework

πŸš€ How to use

  1. Upload an artwork - Supports JPG, PNG and other image formats
  2. Ask questions (optional) - Get specific analysis on style, symbols, or history
  3. Get expert analysis - Receive detailed art historical insights in seconds

Core Components

1. Vision Agent - Phi-3.5-Vision-Instruct

  • Converts artwork images to detailed descriptions
  • Identifies visual elements, colors, composition, style indicators

2. Analysis Agent - SmolAgent Framework

  • Processes descriptions using specialized art tools
  • Multi-step reasoning for comprehensive analysis
  • Fallback system for reliability

πŸ”§ Specialized Tools

🎨 Style Detector

@tool
def art_style_detector(visual_description: str) -> str:
    """Identifies artistic movements and styles"""

Detects: Renaissance, Baroque, Impressionism, Expressionism, Cubism, Surrealism, Abstract, Pop Art, Minimalism

πŸ“š Historical Context Provider

@tool  
def historical_context_provider(art_period: str) -> str:
    """Provides historical and cultural context"""

Includes: Time periods, key artists, cultural influences, movement characteristics

πŸ” Symbolism Interpreter

@tool
def symbolism_interpreter(visual_elements: str) -> str:
    """Decodes symbolic meanings in artwork"""

Analyzes: Colors (red, blue, gold), Objects (crown, flowers, skull), Religious symbols (cross, dove)

⚑ Processing Workflow

  1. Image Analysis: Phi-3.5-Vision describes artwork details
  2. Agent Reasoning: SmolAgent processes description using tools:
    • Style detection from visual cues
    • Historical context for identified period
    • Symbol interpretation from elements
  3. Structured Output: Comprehensive art historical analysis

πŸ›‘οΈ Robust Design

  • Dual Processing: Vision model + reasoning agent
  • Fallback System: Direct tool usage if agent fails
  • GPU Optimization: Fast image processing
  • Dark Theme: Eye-friendly interface

πŸ™ Acknowledgements

Made with ❀️ by Gizem Sarsinlar (@gizemsarsinlar)

πŸŽ₯ Demo Video

Watch the full project walkthrough and live demonstration:

AI Art Historian Demo