add owid subtitles
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ CITATION_TEXT = r"""@misc{climateqa,
|
|
113 |
|
114 |
# Create vectorstore and retriever
|
115 |
vectorstore = get_pinecone_vectorstore(embeddings_function, index_name = os.getenv("PINECONE_API_INDEX"))
|
116 |
-
vectorstore_graphs = get_pinecone_vectorstore(embeddings_function, index_name = os.getenv("PINECONE_API_INDEX_OWID"), text_key="
|
117 |
|
118 |
llm = get_llm(provider="openai",max_tokens = 1024,temperature = 0.0)
|
119 |
reranker = get_reranker("nano")
|
@@ -510,10 +510,11 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
|
|
510 |
with Modal(visible=False) as modal:
|
511 |
citations_network = gr.HTML("<h3>Citations Network Graph</h3>", visible=True, elem_id="papers-citations-network")
|
512 |
btn_citations_network.click(lambda: Modal(visible=True), None, modal)
|
|
|
|
|
513 |
|
514 |
-
|
515 |
-
|
516 |
with gr.Tab("Graphs", elem_id="tab-graphs", id=5) as tab_graphs:
|
|
|
517 |
graphs_container = gr.HTML("<h2>There are no graphs to be displayed at the moment. Try asking another question.</h2>",elem_id="graphs-container")
|
518 |
current_graphs.change(lambda x : x, inputs=[current_graphs], outputs=[graphs_container])
|
519 |
|
|
|
113 |
|
114 |
# Create vectorstore and retriever
|
115 |
vectorstore = get_pinecone_vectorstore(embeddings_function, index_name = os.getenv("PINECONE_API_INDEX"))
|
116 |
+
vectorstore_graphs = get_pinecone_vectorstore(embeddings_function, index_name = os.getenv("PINECONE_API_INDEX_OWID"), text_key="description")
|
117 |
|
118 |
llm = get_llm(provider="openai",max_tokens = 1024,temperature = 0.0)
|
119 |
reranker = get_reranker("nano")
|
|
|
510 |
with Modal(visible=False) as modal:
|
511 |
citations_network = gr.HTML("<h3>Citations Network Graph</h3>", visible=True, elem_id="papers-citations-network")
|
512 |
btn_citations_network.click(lambda: Modal(visible=True), None, modal)
|
513 |
+
|
514 |
+
|
515 |
|
|
|
|
|
516 |
with gr.Tab("Graphs", elem_id="tab-graphs", id=5) as tab_graphs:
|
517 |
+
|
518 |
graphs_container = gr.HTML("<h2>There are no graphs to be displayed at the moment. Try asking another question.</h2>",elem_id="graphs-container")
|
519 |
current_graphs.change(lambda x : x, inputs=[current_graphs], outputs=[graphs_container])
|
520 |
|