A newer version of the Gradio SDK is available:
5.44.1
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
- Upload an artwork - Supports JPG, PNG and other image formats
- Ask questions (optional) - Get specific analysis on style, symbols, or history
- 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
- Image Analysis: Phi-3.5-Vision describes artwork details
- Agent Reasoning: SmolAgent processes description using tools:
- Style detection from visual cues
- Historical context for identified period
- Symbol interpretation from elements
- 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: