Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,10 +39,10 @@ class VectorStore:
|
|
| 39 |
## subsetting
|
| 40 |
def populate_vectors(self, dataset):
|
| 41 |
# Select the text columns to concatenate
|
| 42 |
-
title = dataset['train']['title_cleaned'][:
|
| 43 |
-
recipe = dataset['train']['recipe_new'][:
|
| 44 |
-
allergy = dataset['train']['allergy_type'][:
|
| 45 |
-
ingredients = dataset['train']['ingredients_alternatives'][:
|
| 46 |
|
| 47 |
# Concatenate the text from both columns
|
| 48 |
texts = [f"{tit} {rep} {ingr} {alle}" for tit, rep, ingr,alle in zip(title, recipe, ingredients,allergy)]
|
|
|
|
| 39 |
## subsetting
|
| 40 |
def populate_vectors(self, dataset):
|
| 41 |
# Select the text columns to concatenate
|
| 42 |
+
title = dataset['train']['title_cleaned'][:2000] # Limiting to 2000 examples for the demo
|
| 43 |
+
recipe = dataset['train']['recipe_new'][:2000]
|
| 44 |
+
allergy = dataset['train']['allergy_type'][:2000]
|
| 45 |
+
ingredients = dataset['train']['ingredients_alternatives'][:2000]
|
| 46 |
|
| 47 |
# Concatenate the text from both columns
|
| 48 |
texts = [f"{tit} {rep} {ingr} {alle}" for tit, rep, ingr,alle in zip(title, recipe, ingredients,allergy)]
|