Spaces:
Sleeping

byte-vortex commited on
Commit
500470a
·
verified ·
1 Parent(s): 36d33b1

Deploy Myco from CI

Browse files
Files changed (1) hide show
  1. ui/interface.py +13 -13
ui/interface.py CHANGED
@@ -199,20 +199,20 @@ 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
 
 
199
  from game.engine import get_myco_narrative
200
 
201
  def render_shroom_tab():
202
+ with gr.Blocks() as demo:
203
  with gr.Tab("✨ Magic Mushroom Garden"):
204
+ # 1. Your working iframe remains untouched
205
+ gr.HTML(value=cute_mushroom_garden_html())
 
 
 
 
 
 
 
 
206
 
207
+ # 2. Simple Markdown component for the narrative
208
+ narrative = gr.Markdown(
209
+ value="...",
210
+ elem_id="simple-narrative"
211
+ )
212
+
213
+ # 3. Direct Timer to update the markdown
214
+ # Every 20 seconds, it runs your engine function and updates the text
215
  gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
216
 
217
+ return demo
218
+