Chris Alexiuk
commited on
Commit
•
c20645e
1
Parent(s):
d4215c9
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def make_inference(query, openai_key=""):
|
|
24 |
docsearch = Chroma.from_texts(texts, embeddings, metadatas=[{"source": str(i)} for i in range(len(texts))]).as_retriever()
|
25 |
chain = load_qa_chain(OpenAI(temperature=0), chain_type="refine")
|
26 |
docs = docsearch.get_relevant_documents(query)
|
27 |
-
chain({"input_documents": docs, "question": query}, return_only_outputs=True)
|
28 |
|
29 |
if __name__ == "__main__":
|
30 |
# make a gradio interface
|
|
|
24 |
docsearch = Chroma.from_texts(texts, embeddings, metadatas=[{"source": str(i)} for i in range(len(texts))]).as_retriever()
|
25 |
chain = load_qa_chain(OpenAI(temperature=0), chain_type="refine")
|
26 |
docs = docsearch.get_relevant_documents(query)
|
27 |
+
return chain({"input_documents": docs, "question": query}, return_only_outputs=True)
|
28 |
|
29 |
if __name__ == "__main__":
|
30 |
# make a gradio interface
|