Spaces:
Running
on
Zero
Running
on
Zero
switch to correct orange color
Browse files
app.py
CHANGED
|
@@ -307,15 +307,15 @@ def build_street_html(image_url: str) -> str:
|
|
| 307 |
<div id="image-container" style="position:relative;max-width:960px;margin:0 auto;">
|
| 308 |
<div id="fullscreen-wrapper" style="position:relative; background-color: #000;">
|
| 309 |
<img id="street-image" src="__IMG_URL__" style="width:100%;height:auto;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1);display:block;" />
|
| 310 |
-
<button id="fullscreen-btn" title="Toggle Fullscreen" style="position:absolute;top:10px;right:10px;z-index:10;background:#
|
| 311 |
<!-- SVG icon will be injected by JS -->
|
| 312 |
</button>
|
| 313 |
</div>
|
| 314 |
<div id="mini-map-wrap" style="transition:all 0.3s ease;position:absolute;right:10px;bottom:10px;border:2px solid #fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2);background:#fff;">
|
| 315 |
<div id="mini-map" style="width:100%;height:100%;cursor:pointer"></div>
|
| 316 |
<div id="map-controls" style="position:absolute;right:8px;top:8px;display:flex;gap:6px;z-index:5;">
|
| 317 |
-
<button id="map-size-minus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#
|
| 318 |
-
<button id="map-size-plus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#
|
| 319 |
</div>
|
| 320 |
</div>
|
| 321 |
</div>
|
|
@@ -396,7 +396,7 @@ def gr_submit_guess(round_id: str, lat: float, lng: float, username: str, reques
|
|
| 396 |
<div style=\"display:flex;justify-content:space-between;align-items:center;margin-top:24px;font-size:0.98rem;color:#e2e8f0;flex-wrap:wrap;gap:14px;\">
|
| 397 |
<div style=\"display:flex;gap:16px;align-items:center;flex-wrap:wrap;\">
|
| 398 |
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px rgba(34,197,94,0.6);\"></span>G = Ground Truth</span>
|
| 399 |
-
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#
|
| 400 |
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#2563EB;box-shadow:0 0 8px rgba(37,99,235,0.6);\"></span>A = AI</span>
|
| 401 |
</div>
|
| 402 |
<button id=\"popup-close-next-footer\" style=\"padding:12px 22px;border-radius:12px;border:1px solid rgba(96,165,250,0.4);background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#f8fafc;font-weight:600;cursor:pointer;box-shadow:0 10px 22px rgba(37,99,235,0.48);\">Next Round</button>
|
|
@@ -565,9 +565,9 @@ APP_BOOT_JS = """
|
|
| 565 |
bounds.extend(gMk.getPosition());
|
| 566 |
if (Number.isFinite(ai.lat) && Number.isFinite(ai.lng)) {
|
| 567 |
log("AI coordinates are valid, creating marker.");
|
| 568 |
-
const aMk = new google.maps.Marker({ position: ai, map: m, label: markerLabel('M'), icon: markerIcon('#
|
| 569 |
bounds.extend(aMk.getPosition());
|
| 570 |
-
new google.maps.Polyline({ path: [rnd, ai], geodesic: true, strokeColor: '#
|
| 571 |
} else {
|
| 572 |
log("AI coordinates are NOT valid, skipping marker creation.");
|
| 573 |
}
|
|
@@ -956,7 +956,7 @@ with gr.Blocks(css=APP_CSS, title="LLM GeoGuessr") as demo:
|
|
| 956 |
<div style="display:flex;gap:16px;align-items:center;flex-wrap:wrap;">
|
| 957 |
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px rgba(34,197,94,0.6);"></span>G = Ground Truth</span>
|
| 958 |
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#2563EB;box-shadow:0 0 8px rgba(37,99,235,0.6);"></span>H = Human</span>
|
| 959 |
-
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#
|
| 960 |
</div>
|
| 961 |
<button id="popup-close-next-footer" style="padding:12px 22px;border-radius:12px;border:1px solid rgba(96,165,250,0.4);background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#f8fafc;font-weight:600;cursor:pointer;box-shadow:0 10px 22px rgba(37,99,235,0.48);">Next Round</button>
|
| 962 |
</div>
|
|
@@ -989,12 +989,12 @@ with gr.Blocks(css=APP_CSS, title="LLM GeoGuessr") as demo:
|
|
| 989 |
winner_message = "The AI won this time."
|
| 990 |
|
| 991 |
summary_html = f"""
|
| 992 |
-
<div style='text-align:center; padding: 40px; font-size: 1.2em;'>
|
| 993 |
-
<h2>Game Over!</h2>
|
| 994 |
-
<p>Here are the final scores:</p>
|
| 995 |
-
<p><strong>Your Score:</strong> {total_human:.0f}</p>
|
| 996 |
-
<p><strong>AI's Score:</strong> {total_ai:.0f}</p>
|
| 997 |
-
<h3>{winner_message}</h3>
|
| 998 |
</div>
|
| 999 |
"""
|
| 1000 |
return idx, gr.update(value=summary_html), gr.update(value=""), gr.update(value=""), gr.update(value="")
|
|
|
|
| 307 |
<div id="image-container" style="position:relative;max-width:960px;margin:0 auto;">
|
| 308 |
<div id="fullscreen-wrapper" style="position:relative; background-color: #000;">
|
| 309 |
<img id="street-image" src="__IMG_URL__" style="width:100%;height:auto;border-radius:8px;box-shadow:0 4px 6px rgba(0,0,0,0.1);display:block;" />
|
| 310 |
+
<button id="fullscreen-btn" title="Toggle Fullscreen" style="position:absolute;top:10px;right:10px;z-index:10;background:#FA500F;border:none;color:white;padding:8px;border-radius:4px;cursor:pointer;line-height:0;">
|
| 311 |
<!-- SVG icon will be injected by JS -->
|
| 312 |
</button>
|
| 313 |
</div>
|
| 314 |
<div id="mini-map-wrap" style="transition:all 0.3s ease;position:absolute;right:10px;bottom:10px;border:2px solid #fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2);background:#fff;">
|
| 315 |
<div id="mini-map" style="width:100%;height:100%;cursor:pointer"></div>
|
| 316 |
<div id="map-controls" style="position:absolute;right:8px;top:8px;display:flex;gap:6px;z-index:5;">
|
| 317 |
+
<button id="map-size-minus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#FA500F;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;padding:0;line-height:0;">β</button>
|
| 318 |
+
<button id="map-size-plus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#FA500F;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;padding:0;line-height:0;">+</button>
|
| 319 |
</div>
|
| 320 |
</div>
|
| 321 |
</div>
|
|
|
|
| 396 |
<div style=\"display:flex;justify-content:space-between;align-items:center;margin-top:24px;font-size:0.98rem;color:#e2e8f0;flex-wrap:wrap;gap:14px;\">
|
| 397 |
<div style=\"display:flex;gap:16px;align-items:center;flex-wrap:wrap;\">
|
| 398 |
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px rgba(34,197,94,0.6);\"></span>G = Ground Truth</span>
|
| 399 |
+
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#FA500F;box-shadow:0 0 8px rgba(249,115,22,0.55);\"></span>H = Human</span>
|
| 400 |
<span style=\"display:flex;align-items:center;gap:8px;\"><span style=\"display:inline-flex;width:13px;height:13px;border-radius:50%;background:#2563EB;box-shadow:0 0 8px rgba(37,99,235,0.6);\"></span>A = AI</span>
|
| 401 |
</div>
|
| 402 |
<button id=\"popup-close-next-footer\" style=\"padding:12px 22px;border-radius:12px;border:1px solid rgba(96,165,250,0.4);background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#f8fafc;font-weight:600;cursor:pointer;box-shadow:0 10px 22px rgba(37,99,235,0.48);\">Next Round</button>
|
|
|
|
| 565 |
bounds.extend(gMk.getPosition());
|
| 566 |
if (Number.isFinite(ai.lat) && Number.isFinite(ai.lng)) {
|
| 567 |
log("AI coordinates are valid, creating marker.");
|
| 568 |
+
const aMk = new google.maps.Marker({ position: ai, map: m, label: markerLabel('M'), icon: markerIcon('#FA500F', '#c2410c') });
|
| 569 |
bounds.extend(aMk.getPosition());
|
| 570 |
+
new google.maps.Polyline({ path: [rnd, ai], geodesic: true, strokeColor: '#FA500F', strokeOpacity: 1.0, strokeWeight: 2, map: m });
|
| 571 |
} else {
|
| 572 |
log("AI coordinates are NOT valid, skipping marker creation.");
|
| 573 |
}
|
|
|
|
| 956 |
<div style="display:flex;gap:16px;align-items:center;flex-wrap:wrap;">
|
| 957 |
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px rgba(34,197,94,0.6);"></span>G = Ground Truth</span>
|
| 958 |
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#2563EB;box-shadow:0 0 8px rgba(37,99,235,0.6);"></span>H = Human</span>
|
| 959 |
+
<span style="display:flex;align-items:center;gap:8px;"><span style="display:inline-flex;width:13px;height:13px;border-radius:50%;background:#FA500F;box-shadow:0 0 8px rgba(249,115,22,0.55);"></span>M = Magistral</span>
|
| 960 |
</div>
|
| 961 |
<button id="popup-close-next-footer" style="padding:12px 22px;border-radius:12px;border:1px solid rgba(96,165,250,0.4);background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#f8fafc;font-weight:600;cursor:pointer;box-shadow:0 10px 22px rgba(37,99,235,0.48);">Next Round</button>
|
| 962 |
</div>
|
|
|
|
| 989 |
winner_message = "The AI won this time."
|
| 990 |
|
| 991 |
summary_html = f"""
|
| 992 |
+
<div style='text-align:center; padding: 40px; font-size: 1.2em; color: #FA500F;'>
|
| 993 |
+
<h2 style='color: #FA500F;'>Game Over!</h2>
|
| 994 |
+
<p style='color: #FA500F;'>Here are the final scores:</p>
|
| 995 |
+
<p style='color: #FA500F;'><strong>Your Score:</strong> {total_human:.0f}</p>
|
| 996 |
+
<p style='color: #FA500F;'><strong>AI's Score:</strong> {total_ai:.0f}</p>
|
| 997 |
+
<h3 style='color: #FA500F;'>{winner_message}</h3>
|
| 998 |
</div>
|
| 999 |
"""
|
| 1000 |
return idx, gr.update(value=summary_html), gr.update(value=""), gr.update(value=""), gr.update(value="")
|