Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,9 @@ class VectorStore:
|
|
| 41 |
# Method to populate the vector store with embeddings from a dataset
|
| 42 |
def populate_vectors(self, dataset, batch_size=100):
|
| 43 |
# Use dataset streaming
|
| 44 |
-
dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train[:1500]', streaming=True)
|
|
|
|
|
|
|
| 45 |
|
| 46 |
texts = []
|
| 47 |
i = 0 # Initialize index
|
|
|
|
| 41 |
# Method to populate the vector store with embeddings from a dataset
|
| 42 |
def populate_vectors(self, dataset, batch_size=100):
|
| 43 |
# Use dataset streaming
|
| 44 |
+
#dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train[:1500]', streaming=True)
|
| 45 |
+
dataset = load_dataset('Thefoodprocessor/recipe_new_with_features_full', split='train')
|
| 46 |
+
dataset = dataset.select(range(1500)) # Select the first 1500 examples
|
| 47 |
|
| 48 |
texts = []
|
| 49 |
i = 0 # Initialize index
|