byte-vortex commited on
Commit
af04307
·
verified ·
1 Parent(s): ebe2921

Deploy Myco from CI

Browse files
Files changed (1) hide show
  1. ui/interface.py +22 -24
ui/interface.py CHANGED
@@ -192,29 +192,27 @@ def cute_mushroom_garden_html() -> str:
192
 
193
 
194
  def render_shroom_tab():
195
- with gr.Blocks():
196
- with gr.Tab("✨ Magic Mushroom Garden"):
197
- # 1. The pure animation
198
- gr.HTML(value=cute_mushroom_garden_html())
199
-
200
- # 2. Subtle attribution - clean and unobtrusive
201
- gr.Markdown(
202
- "<sub>*Story generated by Myco AI*</sub>",
203
- elem_id="ai-attribution"
204
- )
205
-
206
- # 3. Simple Markdown component for the narrative
207
- narrative = gr.Markdown(
208
- value="Myco is searching for a story hidden in the moss...",
209
- elem_id="simple-narrative"
210
- )
211
-
212
- # 4. Direct Timer to update the markdown
213
- # Every 20 seconds, it runs your engine function and updates the text
214
- gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
215
-
216
- # 5. Your narrative output
217
- narrative = gr.Markdown(elem_id="narrative-card")
218
-
219
  return demo
220
 
 
192
 
193
 
194
  def render_shroom_tab():
195
+ # 1. Assign the block to 'demo' so it can be returned
196
+ with gr.Blocks() as demo:
197
+ with gr.Tabs():
198
+ with gr.Tab("✨ Magic Mushroom Garden"):
199
+ # The pure animation
200
+ gr.HTML(value=cute_mushroom_garden_html())
201
+
202
+ # Subtle attribution
203
+ gr.Markdown(
204
+ "<sub>*Story generated by Myco AI*</sub>",
205
+ elem_id="ai-attribution"
206
+ )
207
+
208
+ # 2. Define the narrative component ONCE
209
+ narrative = gr.Markdown(
210
+ value="Myco is searching for a story hidden in the moss...",
211
+ elem_id="narrative-card"
212
+ )
213
+
214
+ # 3. Timer updates the ONE narrative component
215
+ gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
216
+
 
 
217
  return demo
218