sudhir2016 commited on
Commit
521d3ef
·
1 Parent(s): 00e0e0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- #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
 
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