Spaces:
Runtime error
Runtime error
agentharbor
commited on
Commit
•
db576dc
1
Parent(s):
5dd6796
Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,8 @@ from langchain.vectorstores import FAISS
|
|
39 |
|
40 |
db = FAISS.from_documents(docs, embeddings)
|
41 |
|
42 |
-
def get_answer(
|
43 |
-
docs = db.similarity_search(
|
44 |
return wrap_text_preserve_newlines(str(docs[0].page_content))
|
45 |
|
46 |
demo = gr.Interface(fn=get_answer, inputs="text", outputs="text")
|
|
|
39 |
|
40 |
db = FAISS.from_documents(docs, embeddings)
|
41 |
|
42 |
+
def get_answer(query):
|
43 |
+
docs = db.similarity_search(query)
|
44 |
return wrap_text_preserve_newlines(str(docs[0].page_content))
|
45 |
|
46 |
demo = gr.Interface(fn=get_answer, inputs="text", outputs="text")
|