update app.py
Browse files
app.py
CHANGED
|
@@ -164,7 +164,9 @@ def preprocess_sound(df):
|
|
| 164 |
df[col] = 0
|
| 165 |
|
| 166 |
# Tags
|
| 167 |
-
|
|
|
|
|
|
|
| 168 |
# One-Hot Encoding tags à la volée
|
| 169 |
all_tags = [t.strip() for sub in df["tags_list"] for t in sub if t.strip() != ""]
|
| 170 |
frequent_tags = set(all_tags) # simplifié, car threshold appliqué dans Colab déjà
|
|
|
|
| 164 |
df[col] = 0
|
| 165 |
|
| 166 |
# Tags
|
| 167 |
+
# Tags
|
| 168 |
+
df["tags_list"] = df["tags"].fillna("").astype(str).str.lower().str.split(",")
|
| 169 |
+
|
| 170 |
# One-Hot Encoding tags à la volée
|
| 171 |
all_tags = [t.strip() for sub in df["tags_list"] for t in sub if t.strip() != ""]
|
| 172 |
frequent_tags = set(all_tags) # simplifié, car threshold appliqué dans Colab déjà
|