SathvikGanta commited on
Commit
8a47c82
·
verified ·
1 Parent(s): 8836d40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -21,7 +21,6 @@ with gr.Blocks(css="styles.css") as app:
21
 
22
  # Display all items as a vertical list
23
  with gr.Column(elem_id="food-list"):
24
- display_area = gr.HTML(visible=False) # Popup card display area
25
  for food_name in FOOD_DATA.keys():
26
  gr.Button(
27
  value=food_name,
@@ -30,12 +29,11 @@ with gr.Blocks(css="styles.css") as app:
30
  ).click(
31
  display_card,
32
  inputs=[gr.Textbox(value=food_name, visible=False)],
33
- outputs=display_area
34
  )
35
 
36
- # Add a dedicated display area for the popup
37
- with gr.Row(elem_id="popup-container"):
38
- display_area.render()
39
 
40
  # Launch the app
41
  app.launch()
 
21
 
22
  # Display all items as a vertical list
23
  with gr.Column(elem_id="food-list"):
 
24
  for food_name in FOOD_DATA.keys():
25
  gr.Button(
26
  value=food_name,
 
29
  ).click(
30
  display_card,
31
  inputs=[gr.Textbox(value=food_name, visible=False)],
32
+ outputs="popup-card"
33
  )
34
 
35
+ # Popup area for displaying the card
36
+ popup_area = gr.HTML(visible=False, elem_id="popup-card")
 
37
 
38
  # Launch the app
39
  app.launch()