Update app.py
Browse files
app.py
CHANGED
|
@@ -425,10 +425,10 @@ def verify_user(email):
|
|
| 425 |
)
|
| 426 |
|
| 427 |
|
| 428 |
-
def
|
| 429 |
# Logic for saving the user details
|
| 430 |
message, _ = handle_user_details(email, name, professional_title, industry, target_audience, personal_background, company_url, action="save")
|
| 431 |
-
return message
|
| 432 |
|
| 433 |
with gr.Blocks() as ui:
|
| 434 |
with gr.Tabs() as tabs:
|
|
@@ -448,8 +448,7 @@ with gr.Blocks() as ui:
|
|
| 448 |
company_url = gr.Textbox(label="Company URL", visible=False)
|
| 449 |
save_button = gr.Button("Save & Proceed")
|
| 450 |
|
| 451 |
-
|
| 452 |
-
return gr.update(selected=1)
|
| 453 |
# Events
|
| 454 |
verify_button.click(
|
| 455 |
verify_user,
|
|
@@ -466,7 +465,7 @@ with gr.Blocks() as ui:
|
|
| 466 |
)
|
| 467 |
|
| 468 |
save_button.click(
|
| 469 |
-
|
| 470 |
inputs=[
|
| 471 |
email,
|
| 472 |
name,
|
|
|
|
| 425 |
)
|
| 426 |
|
| 427 |
|
| 428 |
+
def save_and_switch_tab(email, name, professional_title, industry, target_audience, personal_background, company_url):
|
| 429 |
# Logic for saving the user details
|
| 430 |
message, _ = handle_user_details(email, name, professional_title, industry, target_audience, personal_background, company_url, action="save")
|
| 431 |
+
return message, gr.update(selected=1)
|
| 432 |
|
| 433 |
with gr.Blocks() as ui:
|
| 434 |
with gr.Tabs() as tabs:
|
|
|
|
| 448 |
company_url = gr.Textbox(label="Company URL", visible=False)
|
| 449 |
save_button = gr.Button("Save & Proceed")
|
| 450 |
|
| 451 |
+
|
|
|
|
| 452 |
# Events
|
| 453 |
verify_button.click(
|
| 454 |
verify_user,
|
|
|
|
| 465 |
)
|
| 466 |
|
| 467 |
save_button.click(
|
| 468 |
+
save_and_switch_tab,
|
| 469 |
inputs=[
|
| 470 |
email,
|
| 471 |
name,
|