Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -246,14 +246,20 @@ def coach_all_in_one(
|
|
| 246 |
# -------------------------------
|
| 247 |
# UI (Gradio)
|
| 248 |
# -------------------------------
|
| 249 |
-
with gr.Blocks(title="Beginner Gym Coach
|
|
|
|
| 250 |
gr.Markdown("## 🏋️ Beginner Gym Coach — Multi-Agent\nGive me your basics and I’ll coach you.")
|
| 251 |
|
| 252 |
-
# --- Motivation banner ---
|
| 253 |
banner = gr.Markdown("", elem_id="motivation")
|
| 254 |
-
idx = gr.State(0)
|
| 255 |
-
|
| 256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
|
| 258 |
with gr.Tab("BMI & TDEE"):
|
| 259 |
with gr.Row():
|
|
|
|
| 246 |
# -------------------------------
|
| 247 |
# UI (Gradio)
|
| 248 |
# -------------------------------
|
| 249 |
+
with gr.Blocks(title="Beginner Gym Coach — Multi-Agent",
|
| 250 |
+
css="#motivation{background:#fff6e5;border-left:6px solid #ffa84b;padding:10px 14px;border-radius:8px;font-size:16px;}") as demo:
|
| 251 |
gr.Markdown("## 🏋️ Beginner Gym Coach — Multi-Agent\nGive me your basics and I’ll coach you.")
|
| 252 |
|
|
|
|
| 253 |
banner = gr.Markdown("", elem_id="motivation")
|
| 254 |
+
idx = gr.State(0)
|
| 255 |
+
|
| 256 |
+
# show something immediately
|
| 257 |
+
demo.load(lambda: ("Let’s begin strong! 🚀", 1), outputs=[banner, idx])
|
| 258 |
+
# update every 10 seconds
|
| 259 |
+
demo.load(rotate_msg, inputs=idx, outputs=[banner, idx], every=10)
|
| 260 |
+
|
| 261 |
+
# ... your Tabs ...
|
| 262 |
+
|
| 263 |
|
| 264 |
with gr.Tab("BMI & TDEE"):
|
| 265 |
with gr.Row():
|