Rammohan0504 commited on
Commit
1766e77
·
verified ·
1 Parent(s): e0ae677

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -102,10 +102,11 @@ with gr.Blocks() as demo:
102
  btn_vegan.click(lambda: display_dishes("VEGAN"), outputs=dish_display)
103
  btn_halal.click(lambda: display_dishes("HALAL"), outputs=dish_display)
104
 
105
- demo.add_component(dish_display)
106
- demo.add_component(cart_display)
 
107
 
108
- demo.add_component(gr.HTML(f"""
109
  <div id="popup" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
110
  background-color: white; padding: 20px; border-radius: 10px;
111
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1000; text-align: center; width: 500px;">
@@ -157,6 +158,6 @@ with gr.Blocks() as demo:
157
  closePopup();
158
  }
159
  </script>
160
- """))
161
 
162
- demo.launch()
 
102
  btn_vegan.click(lambda: display_dishes("VEGAN"), outputs=dish_display)
103
  btn_halal.click(lambda: display_dishes("HALAL"), outputs=dish_display)
104
 
105
+ with gr.Row():
106
+ dish_display.render()
107
+ cart_display.render()
108
 
109
+ gr.HTML(f"""
110
  <div id="popup" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
111
  background-color: white; padding: 20px; border-radius: 10px;
112
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1000; text-align: center; width: 500px;">
 
158
  closePopup();
159
  }
160
  </script>
161
+ """)
162
 
163
+ demo.launch()