Chris4K commited on
Commit
de0d88f
·
1 Parent(s): b4b7a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,9 +25,11 @@ text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
25
  vdocuments = text_splitter.split_documents(documents)
26
 
27
  # Add these lines before creating the Chroma vector store
28
- print("Length of embeddings: %s", len(api_hf_embeddings))
29
  print("Length of documents: %s", len(documents))
30
  print("Length of vdocuments: %s", len(vdocuments))
 
 
31
 
32
  # Create Chroma vector store for API embeddings
33
  api_db = Chroma.from_documents(vdocuments, api_hf_embeddings, collection_name="api-collection")
 
25
  vdocuments = text_splitter.split_documents(documents)
26
 
27
  # Add these lines before creating the Chroma vector store
28
+ #print("Length of embeddings: %s", len(api_hf_embeddings))
29
  print("Length of documents: %s", len(documents))
30
  print("Length of vdocuments: %s", len(vdocuments))
31
+ if vdocuments:
32
+ print("Length of embeddings for the first document: %s", len(vdocuments[0].get('embeddings', [])))
33
 
34
  # Create Chroma vector store for API embeddings
35
  api_db = Chroma.from_documents(vdocuments, api_hf_embeddings, collection_name="api-collection")