Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,12 +36,13 @@ with gr.Blocks() as demo:
|
|
36 |
btn = gr.Button(item["name"], elem_id=f"menu-item-{item['name'].lower()}")
|
37 |
output_html = gr.HTML() # Output will be formatted HTML
|
38 |
|
39 |
-
# Display
|
40 |
btn.click(
|
41 |
fn=get_food_details,
|
42 |
-
inputs=[],
|
43 |
-
|
44 |
-
|
|
|
45 |
)
|
46 |
|
47 |
gr.Markdown("<p style='text-align:center; margin-top:20px; color: gray;'>© 2024 Delicious Restaurant | Designed with ❤️</p>")
|
|
|
36 |
btn = gr.Button(item["name"], elem_id=f"menu-item-{item['name'].lower()}")
|
37 |
output_html = gr.HTML() # Output will be formatted HTML
|
38 |
|
39 |
+
# Display clean HTML content on button click
|
40 |
btn.click(
|
41 |
fn=get_food_details,
|
42 |
+
inputs=[gr.Text(value=item["name"], visible=False),
|
43 |
+
gr.Text(value=item["image"], visible=False),
|
44 |
+
gr.Text(value=item["nutrition"], visible=False)],
|
45 |
+
outputs=output_html
|
46 |
)
|
47 |
|
48 |
gr.Markdown("<p style='text-align:center; margin-top:20px; color: gray;'>© 2024 Delicious Restaurant | Designed with ❤️</p>")
|