Spaces:
Runtime error
Runtime error
Ankitajadhav
commited on
Commit
•
94005ba
1
Parent(s):
ed257b3
Update app.py
Browse files
app.py
CHANGED
@@ -21,11 +21,11 @@ class VectorStore:
|
|
21 |
# Method to populate the vector store with embeddings from a dataset
|
22 |
def populate_vectors(self, dataset):
|
23 |
# Select the text columns to concatenate
|
24 |
-
title = dataset['train']['title_cleaned'][:
|
25 |
-
recipe = dataset['train']['recipe_new'][:
|
26 |
-
meal_type = dataset['train']['meal_type'][:
|
27 |
-
allergy = dataset['train']['allergy_type'][:
|
28 |
-
ingredients_alternative = dataset['train']['ingredients_alternatives'][:
|
29 |
|
30 |
# Concatenate the text from both columns
|
31 |
texts = [f"{tit} {rep} {meal} {alle} {ingr} " for tit, rep, meal,alle, ingr in zip(title,recipe,meal_type,allergy,ingredients_alternative)]
|
|
|
21 |
# Method to populate the vector store with embeddings from a dataset
|
22 |
def populate_vectors(self, dataset):
|
23 |
# Select the text columns to concatenate
|
24 |
+
title = dataset['train']['title_cleaned'][:2500] # Limiting to 100 examples for the demo
|
25 |
+
recipe = dataset['train']['recipe_new'][:2500]
|
26 |
+
meal_type = dataset['train']['meal_type'][:2500]
|
27 |
+
allergy = dataset['train']['allergy_type'][:2500]
|
28 |
+
ingredients_alternative = dataset['train']['ingredients_alternatives'][:2500]
|
29 |
|
30 |
# Concatenate the text from both columns
|
31 |
texts = [f"{tit} {rep} {meal} {alle} {ingr} " for tit, rep, meal,alle, ingr in zip(title,recipe,meal_type,allergy,ingredients_alternative)]
|