Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- ui/interface.py +22 -17
ui/interface.py
CHANGED
|
@@ -200,21 +200,26 @@ def render_shroom_tab():
|
|
| 200 |
"""
|
| 201 |
with gr.Tabs():
|
| 202 |
with gr.Tab("✨ Magic Mushroom Garden"):
|
| 203 |
-
#
|
| 204 |
-
gr.
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
|
| 220 |
-
|
|
|
|
| 200 |
"""
|
| 201 |
with gr.Tabs():
|
| 202 |
with gr.Tab("✨ Magic Mushroom Garden"):
|
| 203 |
+
# Wrap everything in a Row to place text on the left and animation on the right
|
| 204 |
+
with gr.Row(equal_height=False):
|
| 205 |
+
|
| 206 |
+
# LEFT SIDE: Text and Attribution Column
|
| 207 |
+
with gr.Column(scale=1, min_width=250):
|
| 208 |
+
# The live narrative text
|
| 209 |
+
narrative = gr.Markdown(
|
| 210 |
+
value="Myco is searching for a story hidden in the moss...",
|
| 211 |
+
elem_id="narrative-card"
|
| 212 |
+
)
|
| 213 |
+
|
| 214 |
+
# Subtle attribution right beneath the text
|
| 215 |
+
gr.Markdown(
|
| 216 |
+
"<sub>*Story generated by Myco AI*</sub>",
|
| 217 |
+
elem_id="ai-attribution"
|
| 218 |
+
)
|
| 219 |
+
|
| 220 |
+
# RIGHT SIDE: The HTML Animation Column
|
| 221 |
+
with gr.Column(scale=2):
|
| 222 |
+
gr.HTML(value=cute_mushroom_garden_html())
|
| 223 |
+
|
| 224 |
+
# Timer updates the single narrative component on the left side
|
| 225 |
gr.Timer(20).tick(fn=get_myco_narrative, outputs=narrative)
|
|
|