lekkalar commited on
Commit
c2c3e9b
1 Parent(s): ad584a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ def load_pdf_and_generate_embeddings(pdf_doc, open_ai_key):
34
  Return the key fields from the question followed by : and the answer :"""
35
  PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
36
  chain_type_kwargs = {"prompt": PROMPT}
37
- 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)
38
 
39
  return "Ready"
40
  else:
 
34
  Return the key fields from the question followed by : and the answer :"""
35
  PROMPT = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
36
  chain_type_kwargs = {"prompt": PROMPT}
37
+ pdf_qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=0, model_name="gpt-4"),chain_type="stuff", retriever=vectordb.as_retriever(search_kwargs={"k": 1}), chain_type_kwargs=chain_type_kwargs, return_source_documents=False)
38
 
39
  return "Ready"
40
  else: