Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -219,6 +219,25 @@ SYMPTOM_KEYWORD_MAP = {
|
|
| 219 |
"irritabilidad": ["cambios de humor", "mal humor", "estar irritable", "irritabilidad"],
|
| 220 |
"depresi贸n": ["tristeza persistente", "des谩nimo", "depresi贸n"]
|
| 221 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
def sanitize_text(text):
|
| 223 |
if not text: return ""
|
| 224 |
return re.sub(r'[.,;()]', '', text).lower().strip()
|
|
|
|
| 219 |
"irritabilidad": ["cambios de humor", "mal humor", "estar irritable", "irritabilidad"],
|
| 220 |
"depresi贸n": ["tristeza persistente", "des谩nimo", "depresi贸n"]
|
| 221 |
}
|
| 222 |
+
|
| 223 |
+
FOOD_NAME_TO_FOODB_KEY = {
|
| 224 |
+
# --- CEREALES Y GRANOS ---
|
| 225 |
+
"alforf贸n": ["buckwheat"], "arroz": ["rice"], "avena": ["oat", "oats"], "cebada": ["barley"], "centeno": ["rye"], "galleta": ["cookie", "biscuit"], "ma铆z": ["corn", "maize"], "pan": ["bread"], "pasta": ["pasta"], "pizza": ["pizza"], "quinoa": ["quinoa"], "trigo": ["wheat"], "trigo sarraceno": ["buckwheat"],
|
| 226 |
+
# --- L脕CTEOS Y DERIVADOS ---
|
| 227 |
+
"crema": ["cream"], "helado": ["ice cream"], "leche": ["milk"], "mantequilla": ["butter"], "queso": ["cheese"], "yogur": ["yogurt", "yoghurt"],
|
| 228 |
+
# --- VEGETALES ---
|
| 229 |
+
"acelga": ["chard", "swiss chard"], "ajo": ["garlic"], "alcachofa": ["artichoke"], "apio": ["celery"], "berenjena": ["eggplant", "aubergine"], "br贸coli": ["broccoli"], "calabac铆n": ["zucchini", "courgette"], "calabaza": ["pumpkin", "squash"], "cebolla": ["onion"], "champi帽贸n": ["mushroom"], "col": ["cabbage"], "coliflor": ["cauliflower"], "edamame": ["edamame"], "esp谩rrago": ["asparagus"], "espinaca": ["spinach"], "garbanzo": ["chickpea"], "guisante": ["pea", "peas"], "frijol": ["bean", "beans"], "lenteja": ["lentil"], "patata": ["potato"], "pepino": ["cucumber"], "pimiento": ["bell pepper", "pepper"], "remolacha": ["beet", "beetroot"], "repollo": ["cabbage"], "seta": ["mushroom"], "soja": ["soy", "soybean"], "tofu": ["tofu"], "tomate": ["tomato"], "zanahoria": ["carrot"],
|
| 230 |
+
# --- FRUTAS ---
|
| 231 |
+
"aguacate": ["avocado"], "albaricoque": ["apricot"], "ar谩ndano": ["blueberry"], "cereza": ["cherry"], "ciruela": ["plum"], "d谩til": ["date"], "frambuesa": ["raspberry"], "fresa": ["strawberry"], "higo": ["fig"], "kiwi": ["kiwi", "kiwifruit"], "lim贸n": ["lemon"], "mandarina": ["tangerine", "mandarin"], "mango": ["mango"], "manzana": ["apple"], "melocot贸n": ["peach"], "mel贸n": ["melon", "cantaloupe"], "mora": ["blackberry"], "naranja": ["orange"], "nectarina": ["nectarine"], "papaya": ["papaya"], "pera": ["pear"], "pi帽a": ["pineapple"], "pl谩tano": ["banana"], "pomelo": ["grapefruit"], "sand铆a": ["watermelon"], "uva": ["grape"],
|
| 232 |
+
# --- PROTE脥NAS (CARNES, PESCADOS, HUEVOS) ---
|
| 233 |
+
"anchoa": ["anchovy", "anchovies"], "at煤n": ["tuna"], "camar贸n": ["shrimp", "prawn"], "carne": ["meat", "beef", "pork", "lamb"], "cerdo": ["pork"], "cordero": ["lamb"], "gamba": ["shrimp", "prawn"], "huevo": ["egg"], "marisco": ["shellfish", "seafood"], "pavo": ["turkey"], "pescado": ["fish"], "pollo": ["chicken"], "salchicha": ["sausage"], "salm贸n": ["salmon"], "sardina": ["sardine"], "ternera": ["beef", "veal"],
|
| 234 |
+
# --- FRUTOS SECOS Y SEMILLAS ---
|
| 235 |
+
"almendra": ["almond"], "anacardo": ["cashew"], "avellana": ["hazelnut"], "cacahuete": ["peanut"], "ch铆a": ["chia", "chia seed"], "lino": ["flax", "flaxseed", "linseed"], "nuez": ["walnut"], "pistacho": ["pistachio"], "s茅samo": ["sesame", "sesame seed"],
|
| 236 |
+
# --- BEBIDAS, DULCES Y CONDIMENTOS ---
|
| 237 |
+
"aceituna": ["olive"], "caf茅": ["coffee"], "caldo": ["broth", "stock"], "cerveza": ["beer"], "chocolate": ["chocolate"], "jengibre": ["ginger"], "c煤rcuma": ["turmeric"], "miel": ["honey"], "mostaza": ["mustard"], "t茅": ["tea"], "vinagre": ["vinegar"], "vino": ["wine", "red wine", "white wine"]
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
|
| 241 |
def sanitize_text(text):
|
| 242 |
if not text: return ""
|
| 243 |
return re.sub(r'[.,;()]', '', text).lower().strip()
|