Rammohan0504 commited on
Commit
aa7d8c5
·
verified ·
1 Parent(s): 82665a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -100,13 +100,13 @@ with gr.Blocks() as demo:
100
  <label>Spice Level:</label>
101
  <select id="spice-select">""" + "".join([f'<option>{spice}</option>' for spice in spice_levels]) + """</select>
102
  <label>Extras:</label>
103
- gr.HTML(
104
- f"""
105
- <div id="extras-select">
106
- """ + "".join([f"<label><input type='checkbox' value='{extra['name']}'>{extra['name']} + {extra['price']}</label>" for extra in extras]) + """
107
- </div>
108
- """
109
- )
110
 
111
 
112
  <button onclick="submitPopup()">Add to Cart</button>
 
100
  <label>Spice Level:</label>
101
  <select id="spice-select">""" + "".join([f'<option>{spice}</option>' for spice in spice_levels]) + """</select>
102
  <label>Extras:</label>
103
+
104
+ html_content = '<div id="extras-select">'
105
+ for extra in extras:
106
+ html_content += f"<label><input type='checkbox' value='{extra['name']}'>{extra['name']} + {extra['price']}</label>"
107
+ html_content += '</div>'
108
+
109
+ gr.HTML(html_content)
110
 
111
 
112
  <button onclick="submitPopup()">Add to Cart</button>