Spaces:
Sleeping
Sleeping
ajuste na tool de vegetais
Browse files
tools.py
CHANGED
@@ -630,7 +630,7 @@ def calculate_excel_sum_by_columns_tool(
|
|
630 |
VEGETABLES = {
|
631 |
"lettuce", "carrot", "broccoli", "spinach", "kale", "celery", "cabbage",
|
632 |
"sweet potato", "radish", "turnip", "cauliflower", "beet", "onion", "garlic",
|
633 |
-
"
|
634 |
"asparagus", "eggplant", "okra", "pumpkin", "squash", "yam", "collard green",
|
635 |
"mustard green", "brussels sprout", "scallion", "fennel", "rhubarb", "artichoke",
|
636 |
"endive", "escarole", "bok choy", "watercress", "turnip green"
|
@@ -665,11 +665,11 @@ def filter_vegetables_from_list_tool(items: list[str]) -> list[str]:
|
|
665 |
Returns:
|
666 |
List of vegetable items
|
667 |
"""
|
668 |
-
|
669 |
for i in items:
|
670 |
-
|
671 |
-
if
|
672 |
-
|
673 |
|
674 |
-
return
|
675 |
|
|
|
630 |
VEGETABLES = {
|
631 |
"lettuce", "carrot", "broccoli", "spinach", "kale", "celery", "cabbage",
|
632 |
"sweet potato", "radish", "turnip", "cauliflower", "beet", "onion", "garlic",
|
633 |
+
"pea", "chard", "arugula", "basil", "parsley", "dill", "leek",
|
634 |
"asparagus", "eggplant", "okra", "pumpkin", "squash", "yam", "collard green",
|
635 |
"mustard green", "brussels sprout", "scallion", "fennel", "rhubarb", "artichoke",
|
636 |
"endive", "escarole", "bok choy", "watercress", "turnip green"
|
|
|
665 |
Returns:
|
666 |
List of vegetable items
|
667 |
"""
|
668 |
+
result =[]
|
669 |
for i in items:
|
670 |
+
|
671 |
+
if normalize_item(i) in VEGETABLES:
|
672 |
+
result.append(i)
|
673 |
|
674 |
+
return result
|
675 |
|