Spaces:
Runtime error
Runtime error
Commit
·
a94bd5e
1
Parent(s):
521d3ef
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,9 @@ text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
|
11 |
texts = text_splitter.split_text(gita)
|
12 |
docsearch = Chroma.from_texts(texts, embeddings)
|
13 |
def answer(query):
|
14 |
-
|
15 |
-
|
16 |
-
out=gita
|
17 |
return out
|
18 |
demo = gr.Interface(fn=answer, inputs='text',outputs='text',examples=[['song celestial']])
|
19 |
demo.launch()
|
|
|
11 |
texts = text_splitter.split_text(gita)
|
12 |
docsearch = Chroma.from_texts(texts, embeddings)
|
13 |
def answer(query):
|
14 |
+
docs = docsearch.similarity_search(query)
|
15 |
+
out=docs[0].page_content
|
16 |
+
#out=gita
|
17 |
return out
|
18 |
demo = gr.Interface(fn=answer, inputs='text',outputs='text',examples=[['song celestial']])
|
19 |
demo.launch()
|