Santhosh1325 commited on
Commit
d183566
·
verified ·
1 Parent(s): 7d13197

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -108,7 +108,7 @@ menu = st.sidebar.selectbox("Menu", ["App", "User Guide"])
108
  if menu == "App":
109
  # Sidebar for user input
110
  st.sidebar.title("User Input")
111
- image_file = st.sidebar.file_uploader("Upload an image of the dish", type=["jpeg", "png"])
112
  age = st.sidebar.number_input("Enter your age", min_value=18)
113
  gender = st.sidebar.selectbox("Select your gender", ["male", "female"])
114
  height_cm = st.sidebar.number_input("Enter your height (cm)", min_value=150.0)
@@ -153,22 +153,22 @@ if menu == "App":
153
  st.markdown(f"<div style='background-color: #d1ecf1; color: #0c5460; padding: 10px; border-radius: 10px;'>{diet_plan}</div>", unsafe_allow_html=True)
154
 
155
  else:
156
- st.error("Please upload a valid image in JPEG or PNG format.")
157
 
158
  # If the user selects the User Guide, show a detailed guide about the app
159
  elif menu == "User Guide":
160
  st.write("## AI Diet Planner User Guide")
161
 
162
  st.markdown("""
163
- Welcome to the **AI Diet Planner**! This tool helps you identify dishes, calculate your caloric needs, and generate a customized diet plan based on your goals.
164
-
165
- ### How to Use:
166
- 1. **Upload a Dish Image**: Go to the sidebar, and upload a photo of the dish you want to analyze.
167
- 2. **Provide Your Personal Details**: Enter your age, gender, height, weight, weight goal, and activity level.
168
- 3. **Submit**: Click the 'Submit' button to get results.
169
-
170
- ### What You Get:
171
- - **Dish Name**: The AI identifies the dish based on the uploaded image.
172
- - **Caloric Metrics**: Your BMI, BMR, and daily caloric needs based on your inputs.
173
- - **Diet Plan**: A custom Indian diet plan tailored to your calorie goals and dish.
174
  """)
 
108
  if menu == "App":
109
  # Sidebar for user input
110
  st.sidebar.title("User Input")
111
+ image_file = st.sidebar.file_uploader("Upload an image of the dish", type=["jpeg", "png", "jpg", "gif"])
112
  age = st.sidebar.number_input("Enter your age", min_value=18)
113
  gender = st.sidebar.selectbox("Select your gender", ["male", "female"])
114
  height_cm = st.sidebar.number_input("Enter your height (cm)", min_value=150.0)
 
153
  st.markdown(f"<div style='background-color: #d1ecf1; color: #0c5460; padding: 10px; border-radius: 10px;'>{diet_plan}</div>", unsafe_allow_html=True)
154
 
155
  else:
156
+ st.error("Please upload a valid image in JPEG, PNG, JPG, or GIF format.")
157
 
158
  # If the user selects the User Guide, show a detailed guide about the app
159
  elif menu == "User Guide":
160
  st.write("## AI Diet Planner User Guide")
161
 
162
  st.markdown("""
163
+ Welcome to the **AI Diet Planner**! This tool helps you calculate various fitness metrics and suggests personalized diet plans.
164
+
165
+ ### Steps to Use the App:
166
+ 1. **Upload an image of the dish**: Use the sidebar to upload an image in `.jpeg`, `.jpg`, `.png`, or `.gif` format.
167
+ 2. **Fill in the personal details**: Input your age, gender, height, weight, activity level, and weight goal.
168
+ 3. **Submit**: Click the submit button to receive the results.
169
+
170
+ ### Features:
171
+ - **Dish Identification**: The app identifies dishes based on the uploaded image.
172
+ - **Metric Calculation**: Calculate BMI, BMR, TDEE, and daily caloric needs based on your personal information.
173
+ - **Personalized Diet Plan**: Get a customized diet plan based on the dish identified and your weight goal.
174
  """)