Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
| 18 |
from pydub import AudioSegment
|
| 19 |
|
| 20 |
# --- Configuration ---
|
| 21 |
-
MAX_WORKERS =
|
| 22 |
PREVIEW_LIMIT = 100 # UI safety cap
|
| 23 |
PROGRESS_THROTTLE = 1.0 # Seconds between UI updates
|
| 24 |
|
|
@@ -127,8 +127,8 @@ def strip_html_for_display(text):
|
|
| 127 |
# Decode HTML entities
|
| 128 |
text = text.replace(' ', ' ').replace('>', '>').replace('<', '<').replace('&', '&')
|
| 129 |
# Limit length for display
|
| 130 |
-
if len(text) >
|
| 131 |
-
text = text[:
|
| 132 |
return text.strip()
|
| 133 |
|
| 134 |
def extract_unique_tags(df):
|
|
|
|
| 18 |
from pydub import AudioSegment
|
| 19 |
|
| 20 |
# --- Configuration ---
|
| 21 |
+
MAX_WORKERS = 4 # Keep low for HF Spaces (CPU/RAM constraint)
|
| 22 |
PREVIEW_LIMIT = 100 # UI safety cap
|
| 23 |
PROGRESS_THROTTLE = 1.0 # Seconds between UI updates
|
| 24 |
|
|
|
|
| 127 |
# Decode HTML entities
|
| 128 |
text = text.replace(' ', ' ').replace('>', '>').replace('<', '<').replace('&', '&')
|
| 129 |
# Limit length for display
|
| 130 |
+
if len(text) > 50:
|
| 131 |
+
text = text[:50] + '...'
|
| 132 |
return text.strip()
|
| 133 |
|
| 134 |
def extract_unique_tags(df):
|