Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- ui/interface.py +22 -0
ui/interface.py
CHANGED
|
@@ -194,3 +194,25 @@ def render_shroom_tab():
|
|
| 194 |
# Just the beautiful animation now.
|
| 195 |
gr.HTML(value=cute_mushroom_garden_html())
|
| 196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
# Just the beautiful animation now.
|
| 195 |
gr.HTML(value=cute_mushroom_garden_html())
|
| 196 |
|
| 197 |
+
|
| 198 |
+
import gradio as gr
|
| 199 |
+
from game.engine import get_myco_narrative
|
| 200 |
+
|
| 201 |
+
def render_shroom_tab():
|
| 202 |
+
with gr.Tabs():
|
| 203 |
+
with gr.Tab("✨ Magic Mushroom Garden"):
|
| 204 |
+
# We wrap the iframe in a relative container to hold the overlay
|
| 205 |
+
with gr.Row(elem_id="garden-container"):
|
| 206 |
+
# 1. Your existing animation
|
| 207 |
+
gr.HTML(value=cute_mushroom_garden_html())
|
| 208 |
+
|
| 209 |
+
# 2. The narrative overlay (positioned on top via CSS)
|
| 210 |
+
narrative = gr.Markdown(
|
| 211 |
+
value="Waiting for the forest to wake...",
|
| 212 |
+
elem_id="narrative-overlay"
|
| 213 |
+
)
|
| 214 |
+
|
| 215 |
+
# 3. Trigger the AI updates
|
| 216 |
+
gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
|
| 217 |
+
|
| 218 |
+
return None # Return your built block/demo
|