Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,11 +24,9 @@ embeddings = GoogleGenerativeAIEmbeddings(
|
|
| 24 |
google_api_key=GOOGLE_API_KEY # Explicitly pass the API key
|
| 25 |
)
|
| 26 |
raw_documents = TextLoader("tagged_description.txt").load()
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
chunk_overlap=50
|
| 31 |
-
)
|
| 32 |
documents = text_splitter.split_documents(raw_documents)
|
| 33 |
db_books = Chroma.from_documents(documents, embeddings)
|
| 34 |
|
|
|
|
| 24 |
google_api_key=GOOGLE_API_KEY # Explicitly pass the API key
|
| 25 |
)
|
| 26 |
raw_documents = TextLoader("tagged_description.txt").load()
|
| 27 |
+
|
| 28 |
+
text_splitter = CharacterTextSplitter(separator="\n", chunk_size=0, chunk_overlap=0)
|
| 29 |
+
|
|
|
|
|
|
|
| 30 |
documents = text_splitter.split_documents(raw_documents)
|
| 31 |
db_books = Chroma.from_documents(documents, embeddings)
|
| 32 |
|