Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def load_doc(pdf_doc, open_ai_key):
|
|
37 |
Return the key fields from the question followed by the answer :"""
|
38 |
PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|
39 |
chain_type_kwargs = {"prompt": PROMPT}
|
40 |
-
pdf_qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=0, model_name="gpt-4"),chain_type="stuff", retriever=vectordb.as_retriever(), chain_type_kwargs=chain_type_kwargs, return_source_documents=
|
41 |
|
42 |
|
43 |
return "Ready"
|
|
|
37 |
Return the key fields from the question followed by the answer :"""
|
38 |
PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|
39 |
chain_type_kwargs = {"prompt": PROMPT}
|
40 |
+
pdf_qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=0, model_name="gpt-4"),chain_type="stuff", retriever=vectordb.as_retriever(), chain_type_kwargs=chain_type_kwargs, return_source_documents=False)
|
41 |
|
42 |
|
43 |
return "Ready"
|