Spaces:
Runtime error
Runtime error
Commit
·
4d0978d
1
Parent(s):
031db11
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,9 @@ from langchain.docstore.document import Document
|
|
4 |
from langchain.embeddings import HuggingFaceEmbeddings
|
5 |
from langchain.text_splitter import CharacterTextSplitter
|
6 |
embeddings = HuggingFaceEmbeddings()
|
7 |
-
with open('Gita.txt') as f:
|
8 |
-
gita = f.read()
|
|
|
9 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
10 |
texts = text_splitter.split_text(gita)
|
11 |
docsearch = Chroma.from_texts(texts, embeddings)
|
|
|
4 |
from langchain.embeddings import HuggingFaceEmbeddings
|
5 |
from langchain.text_splitter import CharacterTextSplitter
|
6 |
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 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
11 |
texts = text_splitter.split_text(gita)
|
12 |
docsearch = Chroma.from_texts(texts, embeddings)
|