Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- ui/gradio_app.py +60 -7
ui/gradio_app.py
CHANGED
|
@@ -270,13 +270,66 @@ def _safe_pos(position):
|
|
| 270 |
return (max(0, min(2, int(x))), max(0, min(2, int(y))))
|
| 271 |
|
| 272 |
HOME_MARKDOWN = """
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
"""
|
| 281 |
|
| 282 |
GUIDE_MARKDOWN = """
|
|
|
|
| 270 |
return (max(0, min(2, int(x))), max(0, min(2, int(y))))
|
| 271 |
|
| 272 |
HOME_MARKDOWN = """
|
| 273 |
+
<div style="
|
| 274 |
+
background: linear-gradient(135deg, rgba(11, 29, 18, 0.85) 0%, rgba(20, 50, 26, 0.95) 100%);
|
| 275 |
+
border: 1px solid rgba(74, 222, 128, 0.3);
|
| 276 |
+
border-left: 5px solid #4ade80;
|
| 277 |
+
border-radius: 16px;
|
| 278 |
+
padding: 24px;
|
| 279 |
+
margin-bottom: 20px;
|
| 280 |
+
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
| 281 |
+
backdrop-filter: blur(4px);
|
| 282 |
+
color: #e2e8f0;
|
| 283 |
+
">
|
| 284 |
+
<h2 style="
|
| 285 |
+
color: #4ade80;
|
| 286 |
+
margin-top: 0;
|
| 287 |
+
font-family: 'Segoe UI', Roboto, sans-serif;
|
| 288 |
+
letter-spacing: 0.5px;
|
| 289 |
+
display: flex;
|
| 290 |
+
align-items: center;
|
| 291 |
+
gap: 8px;
|
| 292 |
+
">
|
| 293 |
+
🍄 Welcome to the Myco Forest
|
| 294 |
+
</h2>
|
| 295 |
+
|
| 296 |
+
<p style="font-size: 1.1em; line-height: 1.6; color: #cbd5e1; margin-bottom: 20px;">
|
| 297 |
+
Myco is a tiny AI-powered forest game.
|
| 298 |
+
</p>
|
| 299 |
+
|
| 300 |
+
<div style="
|
| 301 |
+
display: grid;
|
| 302 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 303 |
+
gap: 12px;
|
| 304 |
+
margin-bottom: 24px;
|
| 305 |
+
">
|
| 306 |
+
<div style="background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05);">
|
| 307 |
+
<strong>🎮 Play</strong><br><span style="font-size: 0.9em; color: #94a3b8;">Search for hidden mushrooms.</span>
|
| 308 |
+
</div>
|
| 309 |
+
<div style="background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05);">
|
| 310 |
+
<strong>📖 MycoDex</strong><br><span style="font-size: 0.9em; color: #94a3b8;">Review your growing collection.</span>
|
| 311 |
+
</div>
|
| 312 |
+
<div style="background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05);">
|
| 313 |
+
<strong>🧭 Guide</strong><br><span style="font-size: 0.9em; color: #94a3b8;">Get help on your journey.</span>
|
| 314 |
+
</div>
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
<div style="
|
| 318 |
+
border-top: 1px dashed rgba(74, 222, 128, 0.2);
|
| 319 |
+
padding-top: 16px;
|
| 320 |
+
background: rgba(74, 222, 128, 0.05);
|
| 321 |
+
padding: 16px;
|
| 322 |
+
border-radius: 12px;
|
| 323 |
+
">
|
| 324 |
+
<span style="color: #4ade80; font-weight: bold; text-transform: uppercase; font-size: 0.85em; letter-spacing: 1px; display: block; margin-bottom: 4px;">
|
| 325 |
+
Main Objective
|
| 326 |
+
</span>
|
| 327 |
+
<p style="margin: 0; font-style: italic; color: #e2e8f0; line-height: 1.5;">
|
| 328 |
+
Solve one mystery — why does Myco remember a forest that vanished before it was born?
|
| 329 |
+
Follow clues until the <strong>Impossible Mushroom</strong> blooms inside the MycoDex.
|
| 330 |
+
</p>
|
| 331 |
+
</div>
|
| 332 |
+
</div>
|
| 333 |
"""
|
| 334 |
|
| 335 |
GUIDE_MARKDOWN = """
|