Spaces:
Sleeping
Sleeping
Update variables.py
Browse files- variables.py +29 -22
variables.py
CHANGED
@@ -1,26 +1,11 @@
|
|
1 |
CONTEXTUAL_ZOOM_PROMPT = """
|
2 |
-
You are an expert art historian specializing in interactive exploration. Analyze the query and generate
|
3 |
|
|
|
4 |
User Query: {user_query}
|
5 |
Current Zoom States: {current_zoom_states}
|
6 |
|
7 |
-
|
8 |
-
1. An "analysis" section containing:
|
9 |
-
- query_focus: Main subject
|
10 |
-
- historical_context: Brief explanation
|
11 |
-
|
12 |
-
2. An "axis_configurations" section with:
|
13 |
-
- temporal configuration (time periods)
|
14 |
-
- geographical configuration (locations)
|
15 |
-
- style configuration (art movements)
|
16 |
-
|
17 |
-
Each axis should include:
|
18 |
-
- Current zoom level details
|
19 |
-
- Available zoom options (in/out)
|
20 |
-
- Impact relationships with other axes
|
21 |
-
- Clear explanations for historical significance
|
22 |
-
|
23 |
-
Generate a complete, valid JSON response matching the ArtHistoryResponse model structure.
|
24 |
"""
|
25 |
|
26 |
CONTEXTUAL_ZOOM_default_response = {
|
@@ -32,15 +17,18 @@ CONTEXTUAL_ZOOM_default_response = {
|
|
32 |
"temporal": {
|
33 |
"component": "st.slider",
|
34 |
"current_zoom": {
|
|
|
35 |
"range": [1700, 2000],
|
36 |
"explanation": "Default time range"
|
37 |
},
|
38 |
"available_zooms": {
|
39 |
-
"
|
|
|
40 |
"range": [1800, 1900],
|
41 |
"explanation": "Zoom in to see more detail"
|
42 |
},
|
43 |
-
"
|
|
|
44 |
"range": [1500, 2024],
|
45 |
"explanation": "Broader historical context"
|
46 |
}
|
@@ -53,6 +41,7 @@ CONTEXTUAL_ZOOM_default_response = {
|
|
53 |
"geographical": {
|
54 |
"component": "st.map",
|
55 |
"current_zoom": {
|
|
|
56 |
"locations": [
|
57 |
{
|
58 |
"name": "Paris",
|
@@ -64,7 +53,8 @@ CONTEXTUAL_ZOOM_default_response = {
|
|
64 |
"explanation": "Default location explanation"
|
65 |
},
|
66 |
"available_zooms": {
|
67 |
-
"
|
|
|
68 |
"locations": [
|
69 |
{
|
70 |
"name": "Louvre",
|
@@ -75,7 +65,8 @@ CONTEXTUAL_ZOOM_default_response = {
|
|
75 |
],
|
76 |
"explanation": "Default zoom in explanation"
|
77 |
},
|
78 |
-
"
|
|
|
79 |
"locations": [
|
80 |
{
|
81 |
"name": "France",
|
@@ -98,6 +89,22 @@ CONTEXTUAL_ZOOM_default_response = {
|
|
98 |
"level": "movement",
|
99 |
"options": ["Classical", "Modern"],
|
100 |
"explanation": "Default art movements"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
}
|
103 |
}
|
|
|
1 |
CONTEXTUAL_ZOOM_PROMPT = """
|
2 |
+
You are an expert art historian specializing in interactive exploration. Analyze the query and generate contextually aware zoom configurations with explanations.
|
3 |
|
4 |
+
###Input###
|
5 |
User Query: {user_query}
|
6 |
Current Zoom States: {current_zoom_states}
|
7 |
|
8 |
+
Generate a complete, valid JSON response following the ArtHistoryResponse model structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
"""
|
10 |
|
11 |
CONTEXTUAL_ZOOM_default_response = {
|
|
|
17 |
"temporal": {
|
18 |
"component": "st.slider",
|
19 |
"current_zoom": {
|
20 |
+
"level": "century",
|
21 |
"range": [1700, 2000],
|
22 |
"explanation": "Default time range"
|
23 |
},
|
24 |
"available_zooms": {
|
25 |
+
"in_zoom": {
|
26 |
+
"level": "decade",
|
27 |
"range": [1800, 1900],
|
28 |
"explanation": "Zoom in to see more detail"
|
29 |
},
|
30 |
+
"out_zoom": {
|
31 |
+
"level": "millennium",
|
32 |
"range": [1500, 2024],
|
33 |
"explanation": "Broader historical context"
|
34 |
}
|
|
|
41 |
"geographical": {
|
42 |
"component": "st.map",
|
43 |
"current_zoom": {
|
44 |
+
"level": "city",
|
45 |
"locations": [
|
46 |
{
|
47 |
"name": "Paris",
|
|
|
53 |
"explanation": "Default location explanation"
|
54 |
},
|
55 |
"available_zooms": {
|
56 |
+
"in_zoom": {
|
57 |
+
"level": "neighborhood",
|
58 |
"locations": [
|
59 |
{
|
60 |
"name": "Louvre",
|
|
|
65 |
],
|
66 |
"explanation": "Default zoom in explanation"
|
67 |
},
|
68 |
+
"out_zoom": {
|
69 |
+
"level": "country",
|
70 |
"locations": [
|
71 |
{
|
72 |
"name": "France",
|
|
|
89 |
"level": "movement",
|
90 |
"options": ["Classical", "Modern"],
|
91 |
"explanation": "Default art movements"
|
92 |
+
},
|
93 |
+
"available_zooms": {
|
94 |
+
"in_zoom": {
|
95 |
+
"level": "sub_movement",
|
96 |
+
"options": ["Early Classical", "Late Modern"],
|
97 |
+
"explanation": "More specific art movements"
|
98 |
+
},
|
99 |
+
"out_zoom": {
|
100 |
+
"level": "period",
|
101 |
+
"options": ["Ancient", "Contemporary"],
|
102 |
+
"explanation": "Broader art periods"
|
103 |
+
}
|
104 |
+
},
|
105 |
+
"impacted_by": {
|
106 |
+
"temporal": "Default temporal impact",
|
107 |
+
"geographical": "Default geographical impact"
|
108 |
}
|
109 |
}
|
110 |
}
|