varl42 commited on
Commit
fe37341
1 Parent(s): c8bca7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -8,14 +8,14 @@ from nltk.tokenize import sent_tokenize
8
  client = chromadb.PersistentClient(path="./")
9
 
10
  # Create a ChromaDB client
11
- client = chromadb.Client()
12
- collection = client.create_collection("enron_emails")
13
 
14
  # Add documents and IDs to the collection, using ChromaDB's built-in text encoding
15
- collection.add(
16
- documents=emails["body"].tolist()[:1000],
17
- ids=emails["file"].tolist()[:1000],
18
- metadatas=[{"source": "enron_emails"}] * len(emails[:1000]), # Optional metadata
19
 
20
 
21
 
 
8
  client = chromadb.PersistentClient(path="./")
9
 
10
  # Create a ChromaDB client
11
+ # client = chromadb.Client()
12
+ # collection = client.create_collection("enron_emails")
13
 
14
  # Add documents and IDs to the collection, using ChromaDB's built-in text encoding
15
+ # collection.add(
16
+ # documents=emails["body"].tolist()[:1000],
17
+ # ids=emails["file"].tolist()[:1000],
18
+ # metadatas=[{"source": "enron_emails"}] * len(emails[:1000]), # Optional metadata
19
 
20
 
21