Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,37 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
|
| 4 |
-
st.
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
# App title
|
| 4 |
+
st.title("ποΈ Workout & Meal Planner π½οΈ")
|
| 5 |
|
| 6 |
+
# User Input - Dropdown for Fitness Goal
|
| 7 |
+
goal = st.selectbox("Select Your Fitness Goal:", ["Weight Loss", "Muscle Gain", "Maintain Fitness"])
|
| 8 |
+
|
| 9 |
+
# User Input - Slider for Workout Intensity
|
| 10 |
+
intensity = st.slider("Select Workout Intensity:", min_value=1, max_value=10, value=5)
|
| 11 |
+
|
| 12 |
+
# User Input - Dropdown for Meal Preference
|
| 13 |
+
cuisine = st.selectbox("Select Your Preferred Cuisine:", ["Chinese", "Korean", "Japanese", "Vietnamese"])
|
| 14 |
+
|
| 15 |
+
# Define predefined outputs
|
| 16 |
+
workout_plans = {
|
| 17 |
+
"Weight Loss": "30 mins treadmill + 20 mins strength training",
|
| 18 |
+
"Muscle Gain": "45 mins strength training + 15 mins HIIT",
|
| 19 |
+
"Maintain Fitness": "30 mins mixed cardio & strength"
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
meal_plans = {
|
| 23 |
+
"Chinese": "Steamed fish with veggies and brown rice",
|
| 24 |
+
"Korean": "Bibimbap with lean beef and kimchi",
|
| 25 |
+
"Japanese": "Grilled salmon with miso soup and edamame",
|
| 26 |
+
"Vietnamese": "Pho with lean chicken and fresh herbs"
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
# Generate output based on user selection
|
| 30 |
+
st.subheader("π Your Recommended Workout Plan:")
|
| 31 |
+
st.write(f"π {workout_plans[goal]} (Intensity Level: {intensity}/10)")
|
| 32 |
+
|
| 33 |
+
st.subheader("π Your Recommended Meal:")
|
| 34 |
+
st.write(f"π {meal_plans[cuisine]}")
|
| 35 |
+
|
| 36 |
+
# Motivational Message
|
| 37 |
+
st.success("Stay consistent and enjoy your fitness journey! πͺ")
|