Update app.py
Browse files
app.py
CHANGED
@@ -441,8 +441,8 @@ def log_on_azure(file, logs, share_client):
|
|
441 |
file_client.upload_file(str(logs))
|
442 |
|
443 |
|
444 |
-
def disable_component():
|
445 |
-
|
446 |
|
447 |
|
448 |
|
@@ -572,7 +572,6 @@ with gr.Blocks(title="π Climate Q&A", css="style.css", theme=theme) as demo:
|
|
572 |
# textbox.submit(predict_climateqa,[textbox,bot],[None,bot,sources_textbox])
|
573 |
(textbox
|
574 |
.submit(answer_user, [textbox,examples_hidden, bot], [textbox, bot],queue = False)
|
575 |
-
.then(disable_component, [examples_questions], [examples_questions],queue = False)
|
576 |
.success(fetch_sources,[textbox,dropdown_sources], [textbox,sources_textbox,docs_textbox,output_query,output_language])
|
577 |
.success(answer_bot, [textbox,bot,docs_textbox,output_query,output_language,dropdown_audience], [textbox,bot],queue = True)
|
578 |
.success(lambda x : textbox,[textbox],[textbox])
|
@@ -580,7 +579,7 @@ with gr.Blocks(title="π Climate Q&A", css="style.css", theme=theme) as demo:
|
|
580 |
|
581 |
(examples_hidden
|
582 |
.change(answer_user_example, [textbox,examples_hidden, bot], [textbox, bot],queue = False)
|
583 |
-
.then(disable_component, [examples_questions], [examples_questions],queue = False)
|
584 |
.success(fetch_sources,[textbox,dropdown_sources], [textbox,sources_textbox,docs_textbox,output_query,output_language])
|
585 |
.success(answer_bot, [textbox,bot,docs_textbox,output_query,output_language,dropdown_audience], [textbox,bot],queue=True)
|
586 |
.success(lambda x : textbox,[textbox],[textbox])
|
|
|
441 |
file_client.upload_file(str(logs))
|
442 |
|
443 |
|
444 |
+
# def disable_component():
|
445 |
+
# return gr.update(interactive = False)
|
446 |
|
447 |
|
448 |
|
|
|
572 |
# textbox.submit(predict_climateqa,[textbox,bot],[None,bot,sources_textbox])
|
573 |
(textbox
|
574 |
.submit(answer_user, [textbox,examples_hidden, bot], [textbox, bot],queue = False)
|
|
|
575 |
.success(fetch_sources,[textbox,dropdown_sources], [textbox,sources_textbox,docs_textbox,output_query,output_language])
|
576 |
.success(answer_bot, [textbox,bot,docs_textbox,output_query,output_language,dropdown_audience], [textbox,bot],queue = True)
|
577 |
.success(lambda x : textbox,[textbox],[textbox])
|
|
|
579 |
|
580 |
(examples_hidden
|
581 |
.change(answer_user_example, [textbox,examples_hidden, bot], [textbox, bot],queue = False)
|
582 |
+
# .then(disable_component, [examples_questions], [examples_questions],queue = False)
|
583 |
.success(fetch_sources,[textbox,dropdown_sources], [textbox,sources_textbox,docs_textbox,output_query,output_language])
|
584 |
.success(answer_bot, [textbox,bot,docs_textbox,output_query,output_language,dropdown_audience], [textbox,bot],queue=True)
|
585 |
.success(lambda x : textbox,[textbox],[textbox])
|