Spaces:
Running
Running
File size: 402 Bytes
b5961aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from chatbot.knowledge.disease import disease_data, nutrients
def get_restrictions(disease: str):
result = {"Kiêng": [], "Hạn chế": [], "Bổ sung": []}
if disease not in disease_data:
return result
values = disease_data[disease]
for nutrient, action in zip(nutrients, values):
if action in result:
result[action].append(nutrient)
return result
|