nagasurendra commited on
Commit
c457259
·
verified ·
1 Parent(s): 1a5c781

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -401,9 +401,10 @@ def app():
401
  with gr.Column(visible=False, elem_id="cart-section") as cart_section:
402
  gr.Markdown("### Cart Page")
403
  cart_output = gr.HTML(value="Your cart is empty.", elem_id="floating-cart")
404
- submitCart_button = gr.Button("Submit Cart")
405
  back_to_menu_button = gr.Button("Back to Menu")
406
 
 
407
  with gr.Column(visible=False, elem_id="final-order-section") as final_order_section:
408
  gr.Markdown("### Final Order")
409
  final_order_output = gr.HTML(value="", elem_id="final-order")
@@ -461,6 +462,12 @@ def app():
461
  lambda: (gr.update(visible=False), gr.update(visible=True)),
462
  outputs=[cart_section, final_order_section],
463
  )
 
 
 
 
 
 
464
 
465
 
466
 
 
401
  with gr.Column(visible=False, elem_id="cart-section") as cart_section:
402
  gr.Markdown("### Cart Page")
403
  cart_output = gr.HTML(value="Your cart is empty.", elem_id="floating-cart")
404
+ submitCart_button = gr.Button("Submit Cart") # Keep only this button
405
  back_to_menu_button = gr.Button("Back to Menu")
406
 
407
+
408
  with gr.Column(visible=False, elem_id="final-order-section") as final_order_section:
409
  gr.Markdown("### Final Order")
410
  final_order_output = gr.HTML(value="", elem_id="final-order")
 
462
  lambda: (gr.update(visible=False), gr.update(visible=True)),
463
  outputs=[cart_section, final_order_section],
464
  )
465
+ # Navigate Back to Menu Page
466
+ back_to_menu_button.click(
467
+ lambda: (gr.update(visible=True), gr.update(visible=False)),
468
+ outputs=[menu_section, cart_section], # Show menu, hide cart
469
+ )
470
+
471
 
472
 
473