Spaces:
Running
Running
Update custom_utils.py
Browse files- custom_utils.py +3 -3
custom_utils.py
CHANGED
@@ -23,11 +23,11 @@ def connect_to_database():
|
|
23 |
def rag_ingestion(collection):
|
24 |
#dataset = load_dataset("bstraehle/airbnb-san-francisco-202403-embed", streaming=True, split="train")
|
25 |
dataset = load_dataset("bstraehle/test", streaming=True, split="train")
|
26 |
-
dataset_df = pd.DataFrame(dataset)
|
27 |
-
listings = process_records(dataset_df)
|
28 |
collection.delete_many({})
|
29 |
collection.insert_many(listings)
|
30 |
-
|
31 |
return "Manually create a vector search index (in free tier, this feature is not available via SDK)"
|
32 |
|
33 |
def process_records(data_frame):
|
|
|
23 |
def rag_ingestion(collection):
|
24 |
#dataset = load_dataset("bstraehle/airbnb-san-francisco-202403-embed", streaming=True, split="train")
|
25 |
dataset = load_dataset("bstraehle/test", streaming=True, split="train")
|
26 |
+
#dataset_df = pd.DataFrame(dataset)
|
27 |
+
#listings = process_records(dataset_df)
|
28 |
collection.delete_many({})
|
29 |
collection.insert_many(listings)
|
30 |
+
collection.insert_many(dataset)
|
31 |
return "Manually create a vector search index (in free tier, this feature is not available via SDK)"
|
32 |
|
33 |
def process_records(data_frame):
|