Datasets:
please
Browse files
recept.py
CHANGED
|
@@ -88,6 +88,8 @@ class Recept(datasets.GeneratorBasedBuilder):
|
|
| 88 |
"list": ingredients,
|
| 89 |
}
|
| 90 |
)
|
|
|
|
|
|
|
| 91 |
|
| 92 |
yield recipe["id"], {
|
| 93 |
"id": recipe["id"],
|
|
@@ -101,5 +103,11 @@ class Recept(datasets.GeneratorBasedBuilder):
|
|
| 101 |
"reviews": recipe["rating"]["numberOfVotes"],
|
| 102 |
"instructions": recipe["instructions"],
|
| 103 |
"ingredients": ingredient_sections,
|
| 104 |
-
"nutrition":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
}
|
|
|
|
| 88 |
"list": ingredients,
|
| 89 |
}
|
| 90 |
)
|
| 91 |
+
|
| 92 |
+
nutrition = recipe["nutrition"]
|
| 93 |
|
| 94 |
yield recipe["id"], {
|
| 95 |
"id": recipe["id"],
|
|
|
|
| 103 |
"reviews": recipe["rating"]["numberOfVotes"],
|
| 104 |
"instructions": recipe["instructions"],
|
| 105 |
"ingredients": ingredient_sections,
|
| 106 |
+
"nutrition": {
|
| 107 |
+
"energy": nutrition.get("energy"),
|
| 108 |
+
"fat": nutrition.get("fat"),
|
| 109 |
+
"salt": nutrition.get("salt"),
|
| 110 |
+
"carbohydrates": nutrition.get("carbohydrates"),
|
| 111 |
+
"protein": nutrition.get("protein"),
|
| 112 |
+
},
|
| 113 |
}
|