File size: 2,762 Bytes
8e5ba83 4489d37 8e5ba83 104d208 8e5ba83 4489d37 104d208 8e5ba83 4489d37 f710bd7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
---
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
```python
@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
```python
@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
```python
@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](https://huggingface.co/gizemsarsinlar))
## π₯ Demo Video
Watch the full project walkthrough and live demonstration:
[](https://youtu.be/xyNKr05Vvls?si=OmHjtOfBez2FjOTv)
|