Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ menu_items = [
|
|
| 110 |
def generate_menu():
|
| 111 |
with gr.Blocks() as menu_interface:
|
| 112 |
gr.Markdown("# Menu")
|
| 113 |
-
output = gr.Textbox(label="Status")
|
| 114 |
for item in menu_items:
|
| 115 |
with gr.Row():
|
| 116 |
with gr.Column(scale=4):
|
|
@@ -118,10 +118,9 @@ def generate_menu():
|
|
| 118 |
with gr.Column(scale=1):
|
| 119 |
button = gr.Button("Add")
|
| 120 |
button.click(fn=add_to_cart, inputs=gr.Textbox(value=item["name"], visible=False), outputs=output)
|
| 121 |
-
gr.Markdown("### Status")
|
| 122 |
-
output.render()
|
| 123 |
return menu_interface
|
| 124 |
|
|
|
|
| 125 |
# Gradio Interface for Signup
|
| 126 |
signup_interface = gr.Interface(fn=signup, inputs=["text", "text"], outputs="text", title="Signup")
|
| 127 |
|
|
|
|
| 110 |
def generate_menu():
|
| 111 |
with gr.Blocks() as menu_interface:
|
| 112 |
gr.Markdown("# Menu")
|
| 113 |
+
output = gr.Textbox(label="Status") # Declare output component only once
|
| 114 |
for item in menu_items:
|
| 115 |
with gr.Row():
|
| 116 |
with gr.Column(scale=4):
|
|
|
|
| 118 |
with gr.Column(scale=1):
|
| 119 |
button = gr.Button("Add")
|
| 120 |
button.click(fn=add_to_cart, inputs=gr.Textbox(value=item["name"], visible=False), outputs=output)
|
|
|
|
|
|
|
| 121 |
return menu_interface
|
| 122 |
|
| 123 |
+
|
| 124 |
# Gradio Interface for Signup
|
| 125 |
signup_interface = gr.Interface(fn=signup, inputs=["text", "text"], outputs="text", title="Signup")
|
| 126 |
|