Chris4K commited on
Commit
88751a5
·
1 Parent(s): 59caffa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -23,6 +23,19 @@ print("-----------")
23
  text_splitter = CharacterTextSplitter(chunk_size=200, chunk_overlap=50)
24
  vdocuments = text_splitter.split_documents(documents)
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  # Create Chroma vector store for API embeddings
27
  api_db = Chroma.from_documents(vdocuments, api_hf_embeddings, collection_name="api-collection")
28
 
 
23
  text_splitter = CharacterTextSplitter(chunk_size=200, chunk_overlap=50)
24
  vdocuments = text_splitter.split_documents(documents)
25
 
26
+
27
+ # Add this import at the beginning of your code
28
+ import logging
29
+
30
+ # Add these lines before creating the Chroma vector store
31
+ logging.basicConfig(level=logging.DEBUG)
32
+ logger = logging.getLogger(__name__)
33
+ logger.debug("Embedding documents using Hugging Face embeddings:")
34
+ embeddings = api_hf_embeddings.embed_documents(documents)
35
+ logger.debug("Embeddings generated successfully.")
36
+
37
+
38
+
39
  # Create Chroma vector store for API embeddings
40
  api_db = Chroma.from_documents(vdocuments, api_hf_embeddings, collection_name="api-collection")
41