Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -541,12 +541,20 @@ def build_interface():
|
|
541 |
|
542 |
submit_button = gr.Button("Submit")
|
543 |
output_text = gr.Textbox(label="Results", lines=15)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
|
545 |
submit_button.click(
|
546 |
-
fn=
|
547 |
inputs=[email_input, name_input, system_prompt_input_1, system_prompt_input_2, system_prompt_input_3],
|
548 |
-
outputs=output_text,
|
549 |
)
|
|
|
550 |
return demo
|
551 |
|
552 |
if __name__ == "__main__":
|
|
|
541 |
|
542 |
submit_button = gr.Button("Submit")
|
543 |
output_text = gr.Textbox(label="Results", lines=15)
|
544 |
+
feedback_md = gr.Markdown("", visible=False)
|
545 |
+
|
546 |
+
def submit_and_disable(email, name, s1, s2, s3):
|
547 |
+
message = submit_prompt(email, name, s1, s2, s3)
|
548 |
+
# Feedback to be shown in the Markdown field
|
549 |
+
feedback = "✅ **Submission received! Thank you.**<br>Please wait for results to appear above. You can close the page."
|
550 |
+
return message, gr.update(interactive=False), gr.update(value=feedback, visible=True)
|
551 |
|
552 |
submit_button.click(
|
553 |
+
fn=submit_and_disable,
|
554 |
inputs=[email_input, name_input, system_prompt_input_1, system_prompt_input_2, system_prompt_input_3],
|
555 |
+
outputs=[output_text, submit_button, feedback_md],
|
556 |
)
|
557 |
+
|
558 |
return demo
|
559 |
|
560 |
if __name__ == "__main__":
|