timeki commited on
Commit
8f806cd
1 Parent(s): ceea3cd

rename config

Browse files
app.py CHANGED
@@ -509,7 +509,7 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
509
  output_language = gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False, visible= False)
510
 
511
 
512
- dropdown_external_sources.change(lambda x: gr.update(visible = True ) if "OpenAlex" in x else gr.update(visible=False) , inputs=[dropdown_external_sources], outputs=[after])
513
 
514
  close_config_modal = gr.Button("Validate and Close",elem_id="close-config-modal")
515
  close_config_modal.click(fn=update_config_modal_visibility, inputs=[config_open], outputs=[config_modal, config_open])
 
509
  output_language = gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False, visible= False)
510
 
511
 
512
+ dropdown_external_sources.change(lambda x: gr.update(visible = True ) if "Papers (OpenAlex)" in x else gr.update(visible=False) , inputs=[dropdown_external_sources], outputs=[after])
513
 
514
  close_config_modal = gr.Button("Validate and Close",elem_id="close-config-modal")
515
  close_config_modal.click(fn=update_config_modal_visibility, inputs=[config_open], outputs=[config_modal, config_open])
climateqa/engine/chains/retrieve_papers.py CHANGED
@@ -33,7 +33,7 @@ def generate_keywords(query):
33
 
34
 
35
  async def find_papers(query,after, relevant_content_sources, reranker= reranker):
36
- if "OpenAlex" in relevant_content_sources:
37
  summary = ""
38
  keywords = generate_keywords(query)
39
  df_works = oa.search(keywords,after = after)
 
33
 
34
 
35
  async def find_papers(query,after, relevant_content_sources, reranker= reranker):
36
+ if "Papers (OpenAlex)" in relevant_content_sources:
37
  summary = ""
38
  keywords = generate_keywords(query)
39
  df_works = oa.search(keywords,after = after)
climateqa/engine/graph.py CHANGED
@@ -158,7 +158,7 @@ def make_graph_agent(llm, vectorstore_ipcc, vectorstore_graphs, reranker, thresh
158
  )
159
  workflow.add_conditional_edges(
160
  "transform_query",
161
- lambda state : "retrieve_graphs" if "OurWorldInData" in state["relevant_content_sources"] else END,
162
  make_id_dict(["retrieve_graphs", END])
163
  )
164
 
 
158
  )
159
  workflow.add_conditional_edges(
160
  "transform_query",
161
+ lambda state : "retrieve_graphs" if "Graphs (OurWorldInData)" in state["relevant_content_sources"] else END,
162
  make_id_dict(["retrieve_graphs", END])
163
  )
164
 
front/utils.py CHANGED
@@ -47,7 +47,7 @@ def process_figures(docs:list, new_figures:list)->tuple:
47
  used_figures = []
48
 
49
  if docs == []:
50
- return figures, gallery, used_figures
51
 
52
 
53
  docs_figures = [d for d in docs if d.metadata["chunk_type"] == "image"]
 
47
  used_figures = []
48
 
49
  if docs == []:
50
+ return docs, figures, gallery
51
 
52
 
53
  docs_figures = [d for d in docs if d.metadata["chunk_type"] == "image"]