Spaces:
Sleeping
Sleeping
File size: 633 Bytes
b4f0671 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
def item_popup():
def get_item_details(item_name):
# Fetch item details from the menu
return {
"Image": "path/to/image.jpg",
"Nutrition": "High Protein",
"Serving Size": "200g"
}
with gr.Group():
gr.Markdown("### Item Details")
item_name = gr.Textbox(label="Item Name")
item_details = get_item_details(item_name)
gr.Image(item_details["Image"], label="Image")
gr.Text(f"Nutrition: {item_details['Nutrition']}")
gr.Text(f"Serving Size: {item_details['Serving Size']}")
gr.Button("Close")
|