Spaces:
Runtime error
Runtime error
Commit
·
521d3ef
1
Parent(s):
00e0e0b
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,9 @@ embeddings = HuggingFaceEmbeddings()
|
|
7 |
#with open('Gita.txt') as f:
|
8 |
#gita = f.read()
|
9 |
gita="story of Arjun and Krishna refered to as song celestial"
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
def answer(query):
|
14 |
#docs = docsearch.similarity_search(query)
|
15 |
#out=docs[0].page_content
|
|
|
7 |
#with open('Gita.txt') as f:
|
8 |
#gita = f.read()
|
9 |
gita="story of Arjun and Krishna refered to as song celestial"
|
10 |
+
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 |
#docs = docsearch.similarity_search(query)
|
15 |
#out=docs[0].page_content
|