nagasurendra commited on
Commit
3c2df37
·
verified ·
1 Parent(s): 878ca85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -126,16 +126,16 @@ def app():
126
  # Submit button for the cart
127
  submit_button = gr.Button("Submit Order")
128
 
129
- # New order page
130
- order_page = gr.Interface(
131
- fn=submit_cart,
132
- inputs=[],
133
- outputs="html",
134
- live=True,
135
- )
136
-
137
- # Submit button action
138
- submit_button.click(fn=submit_cart, inputs=[], outputs=order_page)
139
 
140
  # JavaScript for modal and cart behavior
141
  modal_and_cart_js = """
 
126
  # Submit button for the cart
127
  submit_button = gr.Button("Submit Order")
128
 
129
+ # Submit button action to navigate to a new page
130
+ def navigate_to_order():
131
+ return gr.Interface(
132
+ fn=submit_cart,
133
+ inputs=[],
134
+ outputs="html",
135
+ live=True,
136
+ ).launch()
137
+
138
+ submit_button.click(fn=submit_cart, inputs=[], outputs="html")
139
 
140
  # JavaScript for modal and cart behavior
141
  modal_and_cart_js = """