Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,6 +73,18 @@ GOAL_SPLITS = {
|
|
| 73 |
"Maintain": ["Upper", "Lower", "Full Body", "HIIT/Cardio", "Mobility"],
|
| 74 |
"Build muscle": ["Push", "Pull", "Legs", "Upper", "Lower", "Mobility"]
|
| 75 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
def session_template(name: str, level: str, equipment: str) -> List[str]:
|
| 78 |
# بسيط ومفهوم للمبتدئ
|
|
@@ -239,6 +251,12 @@ def coach_all_in_one(
|
|
| 239 |
with gr.Blocks(title="Beginner Gym Coach - Multi-Agent") as demo:
|
| 240 |
gr.Markdown("## 🏋️ Beginner Gym Coach — Multi-Agent\nGive me your basics and I’ll coach you.")
|
| 241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
with gr.Tab("BMI & TDEE"):
|
| 243 |
with gr.Row():
|
| 244 |
with gr.Column():
|
|
@@ -300,6 +318,7 @@ with gr.Blocks(title="Beginner Gym Coach - Multi-Agent") as demo:
|
|
| 300 |
[sex2, age2, height2, weight2, activity2, goal2, level2, days2, equipment2, liked2, avoid2, meals2],
|
| 301 |
out4
|
| 302 |
)
|
|
|
|
| 303 |
|
| 304 |
if __name__ == "__main__":
|
| 305 |
demo.launch()
|
|
|
|
| 73 |
"Maintain": ["Upper", "Lower", "Full Body", "HIIT/Cardio", "Mobility"],
|
| 74 |
"Build muscle": ["Push", "Pull", "Legs", "Upper", "Lower", "Mobility"]
|
| 75 |
}
|
| 76 |
+
# --- Motivation messages (edit freely) ---
|
| 77 |
+
MOTIVATION = [
|
| 78 |
+
"You’re doing great—one step at a time! 💪",
|
| 79 |
+
"Small habits, big results. Keep going. 🔁",
|
| 80 |
+
"Hydrate and move—your future self thanks you. 💧",
|
| 81 |
+
"Form first, weight second. You’ve got this. 🧠",
|
| 82 |
+
"Consistency beats intensity. Show up today. ✅",
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
def rotate_msg(i: int):
|
| 86 |
+
msg = MOTIVATION[i % len(MOTIVATION)]
|
| 87 |
+
return msg, i + 1
|
| 88 |
|
| 89 |
def session_template(name: str, level: str, equipment: str) -> List[str]:
|
| 90 |
# بسيط ومفهوم للمبتدئ
|
|
|
|
| 251 |
with gr.Blocks(title="Beginner Gym Coach - Multi-Agent") as demo:
|
| 252 |
gr.Markdown("## 🏋️ Beginner Gym Coach — Multi-Agent\nGive me your basics and I’ll coach you.")
|
| 253 |
|
| 254 |
+
# --- Motivation banner ---
|
| 255 |
+
banner = gr.Markdown("", elem_id="motivation")
|
| 256 |
+
idx = gr.State(0) # keeps our current index
|
| 257 |
+
ticker = gr.Timer(interval=10) # fires every 10 seconds
|
| 258 |
+
ticker.tick(rotate_msg, inputs=idx, outputs=[banner, idx])
|
| 259 |
+
|
| 260 |
with gr.Tab("BMI & TDEE"):
|
| 261 |
with gr.Row():
|
| 262 |
with gr.Column():
|
|
|
|
| 318 |
[sex2, age2, height2, weight2, activity2, goal2, level2, days2, equipment2, liked2, avoid2, meals2],
|
| 319 |
out4
|
| 320 |
)
|
| 321 |
+
|
| 322 |
|
| 323 |
if __name__ == "__main__":
|
| 324 |
demo.launch()
|