Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -107,10 +107,10 @@ Get personalized dietary, fitness, and lifestyle plans tailored to your goals an
|
|
107 |
gemini_model = genai.GenerativeModel("gemini-1.5-flash") # β
Correct model initialization
|
108 |
except Exception as e:
|
109 |
st.error(f"β Error initializing Gemini model: {e}")
|
110 |
-
|
111 |
else:
|
112 |
st.error("β GOOGLE_API_KEY is missing. Please check your .env file.")
|
113 |
-
|
114 |
|
115 |
|
116 |
if st.button("π― Generate My Personalized Plan"):
|
@@ -156,8 +156,7 @@ Get personalized dietary, fitness, and lifestyle plans tailored to your goals an
|
|
156 |
|
157 |
st.session_state.fitness_plan = {
|
158 |
"goals": "Build strength, improve endurance, and maintain overall fitness",
|
159 |
-
"routine": fitness_plan,
|
160 |
-
"tips": "Track progress, Rest adequately, Maintain proper form, Stay consistent"
|
161 |
}
|
162 |
|
163 |
st.session_state.activity_plan = {
|
|
|
107 |
gemini_model = genai.GenerativeModel("gemini-1.5-flash") # β
Correct model initialization
|
108 |
except Exception as e:
|
109 |
st.error(f"β Error initializing Gemini model: {e}")
|
110 |
+
return
|
111 |
else:
|
112 |
st.error("β GOOGLE_API_KEY is missing. Please check your .env file.")
|
113 |
+
return
|
114 |
|
115 |
|
116 |
if st.button("π― Generate My Personalized Plan"):
|
|
|
156 |
|
157 |
st.session_state.fitness_plan = {
|
158 |
"goals": "Build strength, improve endurance, and maintain overall fitness",
|
159 |
+
"routine": fitness_plan,"tips": "Track progress, Rest adequately, Maintain proper form, Stay consistent"
|
|
|
160 |
}
|
161 |
|
162 |
st.session_state.activity_plan = {
|