Mohammed-AlQurashi commited on
Commit
649d8a4
·
verified ·
1 Parent(s): 0fb87d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ from langchain.llms import OpenAI
10
  llm = OpenAI(openai_api_key="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", model_name="gpt-3.5-turbo-instruct")
11
  openai_embeddings = OpenAIEmbeddings(openai_api_key='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')
12
  db = FAISS.load_local("faiss_index",openai_embeddings, allow_dangerous_deserialization=True)
13
-
14
  template = """
15
  Answer the question based on the context below. If you can't
16
  answer the question, answer with "I don't know".
 
10
  llm = OpenAI(openai_api_key="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", model_name="gpt-3.5-turbo-instruct")
11
  openai_embeddings = OpenAIEmbeddings(openai_api_key='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')
12
  db = FAISS.load_local("faiss_index",openai_embeddings, allow_dangerous_deserialization=True)
13
+ parser = StrOutputParser()
14
  template = """
15
  Answer the question based on the context below. If you can't
16
  answer the question, answer with "I don't know".