Rammohan0504 commited on
Commit
ce54f5f
·
verified ·
1 Parent(s): 8a618ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -68,11 +68,23 @@ def display_dishes(category):
68
  with gr.Blocks() as demo:
69
  gr.HTML("<h1 style='text-align: center; color: #333;'>🍛 Biryani Hub Menu 🍛</h1>")
70
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  # Buttons for category selection
72
  with gr.Row():
73
- btn_all = gr.Button("ALL")
74
- btn_vegan = gr.Button("VEGAN")
75
- btn_halal = gr.Button("HALAL")
76
 
77
  # Dish display
78
  dish_display = gr.HTML(value=display_dishes("ALL"))
@@ -92,7 +104,7 @@ with gr.Blocks() as demo:
92
 
93
  <h4 style="text-align: left; margin-top: 20px;">Choose Extras</h4>
94
  <div style="display: flex; flex-wrap: wrap; justify-content: space-between; border: 1px solid #ddd; padding: 10px; border-radius: 5px;">
95
- """ + "".join([f'<label style="margin-right: 10px; display: block;"><input type="checkbox" name="extras" value="{extra["name"]}" style="margin-right: 5px;">{extra["name"]} + {extra["price"]}</label>' for extra in extras]) + """
96
  </div>
97
 
98
  <button onclick="addToCart(document.getElementById('popup-title').textContent, document.querySelector('input[name=spice]:checked').value)"
 
68
  with gr.Blocks() as demo:
69
  gr.HTML("<h1 style='text-align: center; color: #333;'>🍛 Biryani Hub Menu 🍛</h1>")
70
 
71
+ # CSS for small buttons
72
+ gr.HTML("""
73
+ <style>
74
+ #small-btn {
75
+ padding: 5px 10px;
76
+ font-size: 14px;
77
+ border-radius: 5px;
78
+ margin: 5px;
79
+ }
80
+ </style>
81
+ """)
82
+
83
  # Buttons for category selection
84
  with gr.Row():
85
+ btn_all = gr.Button("ALL", elem_id="small-btn")
86
+ btn_vegan = gr.Button("VEGAN", elem_id="small-btn")
87
+ btn_halal = gr.Button("HALAL", elem_id="small-btn")
88
 
89
  # Dish display
90
  dish_display = gr.HTML(value=display_dishes("ALL"))
 
104
 
105
  <h4 style="text-align: left; margin-top: 20px;">Choose Extras</h4>
106
  <div style="display: flex; flex-wrap: wrap; justify-content: space-between; border: 1px solid #ddd; padding: 10px; border-radius: 5px;">
107
+ <!-- Your extras section here -->
108
  </div>
109
 
110
  <button onclick="addToCart(document.getElementById('popup-title').textContent, document.querySelector('input[name=spice]:checked').value)"