Spaces:
Sleeping
Sleeping
File size: 5,606 Bytes
1413b3a f975e53 1413b3a 3b8058a f975e53 |
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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
CONTEXTUAL_ZOOM_PROMPT = """
You are an expert art historian specializing in interactive exploration. Analyze the query and generate contextually aware zoom configurations with explanations.
###Input###
User Query: {user_query}
Current Zoom States: {current_zoom_states}
###Output Format###
{
"analysis": {
"query_focus": "main subject",
"historical_context": "brief explanation"
},
"axis_configurations": {
"temporal": {
"component": "st.slider",
"current_zoom": {
"level": "century/decade/year",
"range": [start, end],
"explanation": "Why this time range is relevant"
},
"available_zooms": {
"in": {
"range": [narrower_start, narrower_end],
"explanation": "What focusing here reveals"
},
"out": {
"range": [broader_start, broader_end],
"explanation": "Broader historical context"
}
},
"impacted_by": {
"geographical": "how location affects timeframe",
"style": "how style affects timeframe"
}
},
"geographical": {
"component": "st.map",
"current_zoom": {
"level": "continent/country/city",
"locations": [
{
"name": "",
"lat": 0,
"lon": 0,
"relevance": "why this location matters"
}
]
},
"available_zooms": {
"in": {
"locations": ["more specific locations"],
"explanation": "What focusing here reveals"
},
"out": {
"locations": ["broader regions"],
"explanation": "Broader geographical context"
}
},
"impacted_by": {
"temporal": "how time period affects locations",
"style": "how style affects locations"
}
},
"style": {
"component": "st.multiselect" if current_zoom == "broad" else "st.selectbox",
"current_zoom": {
"level": "movement/sub_movement/specific",
"options": ["list of styles"],
"explanation": "Style context for this period/location"
}
}
},
"streamlit_adaptations": {
"recommended_components": {
"component_name": "reason for recommendation based on zoom level",
"configuration": {}
}
}
}
###Example for "paint during napoleon war"###
{
"temporal": {
"component": "st.slider",
"current_zoom": {
"level": "period",
"range": [1799, 1815],
"explanation": "Napoleon's reign as First Consul and Emperor"
},
"available_zooms": {
"in": {
"range": [1812, 1815],
"explanation": "Focus on final campaigns and artistic responses"
}
}
},
"geographical": {
"component": "st.map",
"current_zoom": {
"level": "continent",
"locations": [
{
"name": "France",
"relevance": "Center of Napoleonic art production"
},
{
"name": "Spain",
"relevance": "Goya's war paintings perspective"
}
]
}
}
}
###Requirements###
1. Explain zoom level changes and their historical significance
2. Adapt Streamlit components based on zoom level
3. Show relationships between different axes
4. Provide historical context for available selections
5. Consider how selections affect other axes
6. Include relevant historical explanations for each zoom level
Generate only the JSON response, maintaining strict JSON format."""
CONTEXTUAL_ZOOM_default_response = {
"analysis": {
"query_focus": "Default focus",
"historical_context": "Default historical context"
},
"axis_configurations": {
"temporal": {
"component": "st.slider",
"current_zoom": {
"level": "century",
"range": [1700, 2000],
"explanation": "Default time range"
},
"available_zooms": {
"in": {
"range": [1800, 1900],
"explanation": "Zoom in to see more detail"
},
"out": {
"range": [1500, 2024],
"explanation": "Broader historical context"
}
}
},
"geographical": {
"current_zoom": {
"level": "continent",
"locations": [
{
"name": "Paris",
"lat": 48.8566,
"lon": 2.3522,
"relevance": "Default location"
}
]
}
},
"style": {
"current_zoom": {
"level": "movement",
"options": ["Classical", "Modern"],
"explanation": "Default art movements"
}
}
}
} |