Spaces:
Running
Running
Luis J Camargo commited on
Commit ·
a0ff692
1
Parent(s): 59c3c55
fix: include '@' in family label stripping pattern
Browse files
app.py
CHANGED
|
@@ -204,7 +204,7 @@ def predict_language(audio_path):
|
|
| 204 |
|
| 205 |
# Map indices to human-readable strings using the LabelExtractor logic
|
| 206 |
# Strip the "<|" and "|>" tags if present for a cleaner UI
|
| 207 |
-
fam_text = label_extractor.family_labels[fam_idx].strip("
|
| 208 |
super_text = label_extractor.super_labels[super_idx].strip("<|>") if super_idx < len(label_extractor.super_labels) else f"Unknown Super ({super_idx})"
|
| 209 |
code_raw = label_extractor.code_labels[code_idx].strip("<|>") if code_idx < len(label_extractor.code_labels) else f"Unknown Code ({code_idx})"
|
| 210 |
|
|
|
|
| 204 |
|
| 205 |
# Map indices to human-readable strings using the LabelExtractor logic
|
| 206 |
# Strip the "<|" and "|>" tags if present for a cleaner UI
|
| 207 |
+
fam_text = label_extractor.family_labels[fam_idx].strip("<@|>") if fam_idx < len(label_extractor.family_labels) else f"Unknown Fam ({fam_idx})"
|
| 208 |
super_text = label_extractor.super_labels[super_idx].strip("<|>") if super_idx < len(label_extractor.super_labels) else f"Unknown Super ({super_idx})"
|
| 209 |
code_raw = label_extractor.code_labels[code_idx].strip("<|>") if code_idx < len(label_extractor.code_labels) else f"Unknown Code ({code_idx})"
|
| 210 |
|