Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 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 |
""")
|