Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- ui/interface.py +15 -16
ui/interface.py
CHANGED
|
@@ -198,24 +198,23 @@ def render_shroom_tab():
|
|
| 198 |
end up in a separate Blocks graph that never gets launched, so the tab
|
| 199 |
renders empty and the Timer never fires.
|
| 200 |
"""
|
| 201 |
-
with gr.
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
elem_id="narrative-card"
|
| 209 |
-
)
|
| 210 |
-
|
| 211 |
-
# Subtle attribution placed right beneath the narrative card
|
| 212 |
-
attribution = gr.Markdown(
|
| 213 |
"<sub>*Story generated by Myco AI*</sub>",
|
| 214 |
elem_id="ai-attribution"
|
| 215 |
)
|
| 216 |
|
| 217 |
-
#
|
| 218 |
-
gr.
|
|
|
|
|
|
|
|
|
|
| 219 |
|
| 220 |
-
|
| 221 |
-
|
|
|
|
|
|
| 198 |
end up in a separate Blocks graph that never gets launched, so the tab
|
| 199 |
renders empty and the Timer never fires.
|
| 200 |
"""
|
| 201 |
+
with gr.Tabs():
|
| 202 |
+
with gr.Tab("✨ Magic Mushroom Garden"):
|
| 203 |
+
# The pure animation
|
| 204 |
+
gr.HTML(value=cute_mushroom_garden_html())
|
| 205 |
+
|
| 206 |
+
# Subtle attribution
|
| 207 |
+
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
"<sub>*Story generated by Myco AI*</sub>",
|
| 209 |
elem_id="ai-attribution"
|
| 210 |
)
|
| 211 |
|
| 212 |
+
# Define the narrative component ONCE
|
| 213 |
+
narrative = gr.Markdown(
|
| 214 |
+
value="Myco is searching for a story hidden in the moss...",
|
| 215 |
+
elem_id="narrative-card"
|
| 216 |
+
)
|
| 217 |
|
| 218 |
+
# Timer updates the ONE narrative component
|
| 219 |
+
gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
|
| 220 |
+
|