Spaces:
Runtime error
Runtime error
victorialslocum
commited on
Commit
•
0b93d5b
1
Parent(s):
8282bc9
fix ingredients list
Browse files
app.py
CHANGED
@@ -43,13 +43,15 @@ def get_recipe_data(recipe_url):
|
|
43 |
|
44 |
def get_ingredient_data(instructions, ingredients):
|
45 |
doc = nlp(instructions)
|
|
|
46 |
|
47 |
ingredients_list = []
|
48 |
|
49 |
# TODO: add lemmatizer
|
50 |
-
for
|
51 |
-
if
|
52 |
-
ingredients_list
|
|
|
53 |
|
54 |
ingredients = ""
|
55 |
|
|
|
43 |
|
44 |
def get_ingredient_data(instructions, ingredients):
|
45 |
doc = nlp(instructions)
|
46 |
+
print(doc)
|
47 |
|
48 |
ingredients_list = []
|
49 |
|
50 |
# TODO: add lemmatizer
|
51 |
+
for item in doc:
|
52 |
+
if item[1] == 'INGREDIENT':
|
53 |
+
if item[0] not in ingredients_list:
|
54 |
+
ingredients_list.append(item[0])
|
55 |
|
56 |
ingredients = ""
|
57 |
|