quantamentalfinance commited on
Commit
2c9c312
1 Parent(s): c379b0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -55,7 +55,10 @@ def source_question_answer(query:str,vectorstore:Chroma=chroma_db,llm:HuggingFac
55
  qa_chain = load_qa_chain(llm, chain_type="stuff")
56
  query = f"[INST]According to the earnings calls transcripts earlier, {query}[INST]"
57
 
58
- response = qa_chain.run(input_documents=input_docs, question=query)
 
 
 
59
  source_docs_1 = input_docs[0].page_content
60
  source_docs_2 = input_docs[1].page_content
61
  source_docs_3 = input_docs[2].page_content
 
55
  qa_chain = load_qa_chain(llm, chain_type="stuff")
56
  query = f"[INST]According to the earnings calls transcripts earlier, {query}[INST]"
57
 
58
+ full_response = qa_chain.run(input_documents=input_docs, question=query)
59
+
60
+ response = full_response.get('Helpful Answer:', 'No answer found') # Adjust 'answer' key as necessary
61
+
62
  source_docs_1 = input_docs[0].page_content
63
  source_docs_2 = input_docs[1].page_content
64
  source_docs_3 = input_docs[2].page_content