nagasurendra's picture
Create item_popup.py
b4f0671 verified
raw
history blame contribute delete
633 Bytes
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")