Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,7 +57,6 @@ with gr.Blocks() as demo:
|
|
| 57 |
btn_halal = gr.Button("HALAL")
|
| 58 |
|
| 59 |
dish_display = gr.HTML(value=display_dishes())
|
| 60 |
-
cart_display = gr.HTML(value="<p>Your cart is empty.</p>")
|
| 61 |
|
| 62 |
btn_all.click(lambda: display_dishes("ALL"), outputs=dish_display)
|
| 63 |
btn_vegan.click(lambda: display_dishes("VEGAN"), outputs=dish_display)
|
|
@@ -70,7 +69,7 @@ with gr.Blocks() as demo:
|
|
| 70 |
add_to_cart_button.click(
|
| 71 |
add_to_cart,
|
| 72 |
inputs=[cart, selected_item],
|
| 73 |
-
outputs=[cart
|
| 74 |
)
|
| 75 |
|
| 76 |
gr.HTML("""
|
|
@@ -102,7 +101,7 @@ with gr.Blocks() as demo:
|
|
| 102 |
headers: { 'Content-Type': 'application/json' },
|
| 103 |
body: JSON.stringify({ data: [] })
|
| 104 |
}).then(response => response.json()).then(data => {
|
| 105 |
-
document.getElementById('cart-content').innerHTML = data.data[
|
| 106 |
});
|
| 107 |
}
|
| 108 |
|
|
|
|
| 57 |
btn_halal = gr.Button("HALAL")
|
| 58 |
|
| 59 |
dish_display = gr.HTML(value=display_dishes())
|
|
|
|
| 60 |
|
| 61 |
btn_all.click(lambda: display_dishes("ALL"), outputs=dish_display)
|
| 62 |
btn_vegan.click(lambda: display_dishes("VEGAN"), outputs=dish_display)
|
|
|
|
| 69 |
add_to_cart_button.click(
|
| 70 |
add_to_cart,
|
| 71 |
inputs=[cart, selected_item],
|
| 72 |
+
outputs=[cart]
|
| 73 |
)
|
| 74 |
|
| 75 |
gr.HTML("""
|
|
|
|
| 101 |
headers: { 'Content-Type': 'application/json' },
|
| 102 |
body: JSON.stringify({ data: [] })
|
| 103 |
}).then(response => response.json()).then(data => {
|
| 104 |
+
document.getElementById('cart-content').innerHTML = data.data[0];
|
| 105 |
});
|
| 106 |
}
|
| 107 |
|