Spaces:
Runtime error
Runtime error
Commit ·
f98fc38
1
Parent(s): a1b12c8
Update app.py
Browse files
app.py
CHANGED
|
@@ -412,15 +412,15 @@ with gr.Blocks() as demo:
|
|
| 412 |
""")
|
| 413 |
accept_button = gr.Button("I Agree")
|
| 414 |
|
| 415 |
-
|
| 416 |
-
|
| 417 |
|
| 418 |
-
|
| 419 |
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
|
| 425 |
# demo.queue(max_size=20, concurrency_count=10, api_open=False).launch()
|
| 426 |
|
|
|
|
| 412 |
""")
|
| 413 |
accept_button = gr.Button("I Agree")
|
| 414 |
|
| 415 |
+
def enable_inputs():
|
| 416 |
+
return user_consent_block.update(visible=False), main_block.update(visible=True)
|
| 417 |
|
| 418 |
+
accept_button.click(fn=enable_inputs, inputs=[], outputs=[user_consent_block, main_block], queue=False)
|
| 419 |
|
| 420 |
+
inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
|
| 421 |
+
inputs.submit(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key
|
| 422 |
+
b1.click(reset_textbox, [], [inputs, b1], queue=False)
|
| 423 |
+
b1.click(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key
|
| 424 |
|
| 425 |
# demo.queue(max_size=20, concurrency_count=10, api_open=False).launch()
|
| 426 |
|