Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def map_type_to_category(item_type: str) -> str:
|
|
| 86 |
Falls back to 'unknown' if no reasonable match is found.
|
| 87 |
"""
|
| 88 |
if not item_type:
|
| 89 |
-
return "
|
| 90 |
t = item_type.strip().lower()
|
| 91 |
# direct hit
|
| 92 |
if t in CATEGORIES:
|
|
@@ -103,7 +103,7 @@ def map_type_to_category(item_type: str) -> str:
|
|
| 103 |
for token in t.replace("_", " ").split():
|
| 104 |
if token in CATEGORIES:
|
| 105 |
return token
|
| 106 |
-
return "
|
| 107 |
|
| 108 |
|
| 109 |
# ---------- Firebase init helpers ----------
|
|
|
|
| 86 |
Falls back to 'unknown' if no reasonable match is found.
|
| 87 |
"""
|
| 88 |
if not item_type:
|
| 89 |
+
return "others"
|
| 90 |
t = item_type.strip().lower()
|
| 91 |
# direct hit
|
| 92 |
if t in CATEGORIES:
|
|
|
|
| 103 |
for token in t.replace("_", " ").split():
|
| 104 |
if token in CATEGORIES:
|
| 105 |
return token
|
| 106 |
+
return "others"
|
| 107 |
|
| 108 |
|
| 109 |
# ---------- Firebase init helpers ----------
|