teganmosi commited on
Commit
96f2941
Β·
verified Β·
1 Parent(s): 08dd7b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -7
app.py CHANGED
@@ -250,17 +250,51 @@ with gr.Blocks(css="""
250
  <div style='background: linear-gradient(to right, #D4A373, #FEE440); padding: 20px; border-radius: 15px; text-align: center;'>
251
  <h1>Snack Predictor πŸͺ</h1>
252
  <p>Tell us your vibe, and we'll find your perfect snack! Powered by ML (~97% accurate)</p>
 
253
  </div>
254
  """)
255
- gr.HTML("<p style='text-align: center; color: #4A2C2A; margin-top: 15px;'>Welcome to your snack adventure! πŸ˜‹</p>")
256
 
257
  with gr.Row():
258
  with gr.Column(scale=1):
259
- mood = gr.Dropdown(choices=moods, label="Mood", value="happy", elem_classes="gr-dropdown")
260
- time_of_day = gr.Dropdown(choices=times_of_day, label="Time of Day", value="morning", elem_classes="gr-dropdown")
261
- hunger_level = gr.Slider(minimum=0, maximum=1, step=0.1, label="Hunger Level (0 to 1)", value=0.5, elem_classes="gr-slider")
262
- sentiment = gr.Slider(minimum=-1, maximum=1, step=0.1, label="Sentiment (-1 to 1)", value=0.0, elem_classes="gr-slider")
263
- snack_type = gr.Dropdown(choices=['sweet', 'savory', 'spicy', 'light'], label="Snack Type", value="sweet", elem_classes="gr-dropdown")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  predict_btn = gr.Button("Find My Snack!", variant="primary", elem_classes="gr-button")
265
 
266
  with gr.Column(scale=1):
@@ -288,7 +322,7 @@ with gr.Blocks(css="""
288
 
289
  gr.HTML("""
290
  <div class='footer'>
291
- <p>Built with ❀️ by @teganmosi πŸš€</p>
292
  <p>Follow my #WeeklyMLProjects for more! 🍟</p>
293
  </div>
294
  """)
 
250
  <div style='background: linear-gradient(to right, #D4A373, #FEE440); padding: 20px; border-radius: 15px; text-align: center;'>
251
  <h1>Snack Predictor πŸͺ</h1>
252
  <p>Tell us your vibe, and we'll find your perfect snack! Powered by ML (~97% accurate)</p>
253
+ <p style='font-size: 1em; margin-top: 10px;'>Select your mood, time, and preferences below, then hit "Find My Snack!" to get a tasty recommendation with a pic! πŸ˜‹</p>
254
  </div>
255
  """)
 
256
 
257
  with gr.Row():
258
  with gr.Column(scale=1):
259
+ mood = gr.Dropdown(
260
+ choices=moods,
261
+ label="Mood",
262
+ value="happy",
263
+ elem_classes="gr-dropdown",
264
+ info="How are you feeling right now? Pick a mood that matches your vibe."
265
+ )
266
+ time_of_day = gr.Dropdown(
267
+ choices=times_of_day,
268
+ label="Time of Day",
269
+ value="morning",
270
+ elem_classes="gr-dropdown",
271
+ info="What time is it? This helps pick snacks that suit the moment."
272
+ )
273
+ hunger_level = gr.Slider(
274
+ minimum=0,
275
+ maximum=1,
276
+ step=0.1,
277
+ label="Hunger Level (0 to 1)",
278
+ value=0.5,
279
+ elem_classes="gr-slider",
280
+ info="How hungry are you? 0 = not hungry, 1 = starving!"
281
+ )
282
+ sentiment = gr.Slider(
283
+ minimum=-1,
284
+ maximum=1,
285
+ step=0.1,
286
+ label="Sentiment (-1 to 1)",
287
+ value=0.0,
288
+ elem_classes="gr-slider",
289
+ info="What's your emotional vibe? -1 = feeling down, 0 = neutral, +1 = super upbeat."
290
+ )
291
+ snack_type = gr.Dropdown(
292
+ choices=['sweet', 'savory', 'spicy', 'light'],
293
+ label="Snack Type",
294
+ value="sweet",
295
+ elem_classes="gr-dropdown",
296
+ info="What kind of snack do you crave? Sweet, savory, spicy, or light."
297
+ )
298
  predict_btn = gr.Button("Find My Snack!", variant="primary", elem_classes="gr-button")
299
 
300
  with gr.Column(scale=1):
 
322
 
323
  gr.HTML("""
324
  <div class='footer'>
325
+ <p>Built with ❀️ by @teganmosi </p>
326
  <p>Follow my #WeeklyMLProjects for more! 🍟</p>
327
  </div>
328
  """)