Remove unecessary figures
Browse files
app.py
CHANGED
@@ -602,9 +602,9 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
|
|
602 |
def start_chat(query,history,search_only):
|
603 |
history = history + [ChatMessage(role="user", content=query)]
|
604 |
if not search_only:
|
605 |
-
return (gr.update(interactive = False),gr.update(selected=1),history)
|
606 |
else:
|
607 |
-
return (gr.update(interactive = False),gr.update(selected=2),history)
|
608 |
|
609 |
def finish_chat():
|
610 |
return gr.update(interactive = True,value = "")
|
@@ -644,7 +644,7 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
|
|
644 |
|
645 |
(textbox
|
646 |
.submit(start_chat, [textbox, chatbot, search_only],
|
647 |
-
[textbox, tabs, chatbot],
|
648 |
queue=False,
|
649 |
api_name="start_chat_textbox")
|
650 |
.then(chat, [textbox, chatbot, dropdown_audience, dropdown_sources,
|
@@ -660,7 +660,7 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
|
|
660 |
|
661 |
|
662 |
(examples_hidden
|
663 |
-
.change(start_chat, [examples_hidden,chatbot, search_only], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_examples")
|
664 |
.then(chat, [examples_hidden,chatbot,dropdown_audience, dropdown_sources,dropdown_reports, dropdown_external_sources, search_only] ,[chatbot,sources_textbox,output_query,output_language, new_figures, current_graphs],concurrency_limit = 8,api_name = "chat_textbox")
|
665 |
.then(finish_chat, None, [textbox],api_name = "finish_chat_examples")
|
666 |
# .then(update_sources_number_display, [sources_textbox, figures_cards, current_graphs,papers_html],[tab_sources, tab_figures, tab_graphs, tab_papers] )
|
|
|
602 |
def start_chat(query,history,search_only):
|
603 |
history = history + [ChatMessage(role="user", content=query)]
|
604 |
if not search_only:
|
605 |
+
return (gr.update(interactive = False),gr.update(selected=1),history, [])
|
606 |
else:
|
607 |
+
return (gr.update(interactive = False),gr.update(selected=2),history, [])
|
608 |
|
609 |
def finish_chat():
|
610 |
return gr.update(interactive = True,value = "")
|
|
|
644 |
|
645 |
(textbox
|
646 |
.submit(start_chat, [textbox, chatbot, search_only],
|
647 |
+
[textbox, tabs, chatbot, sources_raw],
|
648 |
queue=False,
|
649 |
api_name="start_chat_textbox")
|
650 |
.then(chat, [textbox, chatbot, dropdown_audience, dropdown_sources,
|
|
|
660 |
|
661 |
|
662 |
(examples_hidden
|
663 |
+
.change(start_chat, [examples_hidden,chatbot, search_only], [textbox,tabs,chatbot, sources_raw],queue = False,api_name = "start_chat_examples")
|
664 |
.then(chat, [examples_hidden,chatbot,dropdown_audience, dropdown_sources,dropdown_reports, dropdown_external_sources, search_only] ,[chatbot,sources_textbox,output_query,output_language, new_figures, current_graphs],concurrency_limit = 8,api_name = "chat_textbox")
|
665 |
.then(finish_chat, None, [textbox],api_name = "finish_chat_examples")
|
666 |
# .then(update_sources_number_display, [sources_textbox, figures_cards, current_graphs,papers_html],[tab_sources, tab_figures, tab_graphs, tab_papers] )
|