nagasurendra commited on
Commit
ab985f7
·
verified ·
1 Parent(s): 753f99d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -307,8 +307,10 @@ def navigate_to_login():
307
  def app():
308
  with gr.Blocks() as demo:
309
  # Cart & Final Order Page (Always at the Top)
310
- with gr.Column(visible=False) as cart_section:
311
- gr.Markdown("### Cart & Final Order Page")
 
 
312
 
313
  # Floating cart display
314
  cart_output = gr.HTML(value="Your cart is empty.", elem_id="floating-cart")
@@ -342,26 +344,24 @@ def app():
342
  signup_button = gr.Button("Sign Up")
343
  go_to_login = gr.Button("Back to Login")
344
 
345
- # Menu Page (Below Cart Section)
346
  with gr.Column(visible=False) as menu_section:
347
- gr.Markdown("### Menu Page (Accessible Only After Login)")
348
-
349
  # View Cart Button (Top Position)
350
  view_cart_button_top = gr.Button("View Cart")
351
-
352
  # Radio button for selecting preference
353
  selected_preference = gr.Radio(
354
  choices=["All", "Vegetarian", "Halal/Non-Veg", "Guilt Free"],
355
  value="All",
356
  label="Choose a Preference",
357
  )
358
- empty_div = gr.HTML('<div style="height: 20px;"></div>')
359
-
360
- # Output area for menu items
361
  menu_output = gr.HTML(value=filter_menu("All"))
362
 
363
  # View Cart Button (Original Position)
364
  view_cart_button_bottom = gr.Button("View Cart")
 
365
  empty_div = gr.HTML('<div style="height: 300px;"></div>')
366
 
367
  # Modal window
@@ -409,6 +409,7 @@ def app():
409
 
410
  # Button Bindings
411
  # Login Button
 
412
  login_button.click(
413
  lambda email, password: (gr.update(visible=False), gr.update(visible=True), "") if check_credentials(email, password) else (gr.update(), gr.update(), "Invalid email or password."),
414
  inputs=[login_email, login_password],
 
307
  def app():
308
  with gr.Blocks() as demo:
309
  # Cart & Final Order Page (Always at the Top)
310
+
311
+ with gr.Row(visible=False) as cart_section:
312
+ gr.Column(visible=True)
313
+ gr.Markdown("### Cart & Final Order Page (Always at the Top)")
314
 
315
  # Floating cart display
316
  cart_output = gr.HTML(value="Your cart is empty.", elem_id="floating-cart")
 
344
  signup_button = gr.Button("Sign Up")
345
  go_to_login = gr.Button("Back to Login")
346
 
347
+ # Menu Page
348
  with gr.Column(visible=False) as menu_section:
349
+ gr.Markdown("### Menu Page (Below Cart Section)")
350
+
351
  # View Cart Button (Top Position)
352
  view_cart_button_top = gr.Button("View Cart")
353
+ empty_div = gr.HTML('<div style="height: 20px;"></div>')
354
  # Radio button for selecting preference
355
  selected_preference = gr.Radio(
356
  choices=["All", "Vegetarian", "Halal/Non-Veg", "Guilt Free"],
357
  value="All",
358
  label="Choose a Preference",
359
  )
 
 
 
360
  menu_output = gr.HTML(value=filter_menu("All"))
361
 
362
  # View Cart Button (Original Position)
363
  view_cart_button_bottom = gr.Button("View Cart")
364
+
365
  empty_div = gr.HTML('<div style="height: 300px;"></div>')
366
 
367
  # Modal window
 
409
 
410
  # Button Bindings
411
  # Login Button
412
+ # Login Button
413
  login_button.click(
414
  lambda email, password: (gr.update(visible=False), gr.update(visible=True), "") if check_credentials(email, password) else (gr.update(), gr.update(), "Invalid email or password."),
415
  inputs=[login_email, login_password],