Spaces:
Runtime error
Runtime error
fix missing audio
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import csv
|
|
| 6 |
import time
|
| 7 |
import datetime
|
| 8 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 9 |
|
| 10 |
# NO GPU
|
| 11 |
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
|
@@ -80,12 +81,16 @@ def process(prompt, lang):
|
|
| 80 |
else:
|
| 81 |
writer.writerow([file, "no metadata provided"])
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
print("Total time : ", time.time() - a)
|
| 91 |
return output_csv, formated
|
|
|
|
| 6 |
import time
|
| 7 |
import datetime
|
| 8 |
from huggingface_hub import hf_hub_download
|
| 9 |
+
import traceback
|
| 10 |
|
| 11 |
# NO GPU
|
| 12 |
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
|
|
|
| 81 |
else:
|
| 82 |
writer.writerow([file, "no metadata provided"])
|
| 83 |
|
| 84 |
+
try:
|
| 85 |
+
formated.append(
|
| 86 |
+
{
|
| 87 |
+
"f": f"{position+1} - {file}",
|
| 88 |
+
"t": get_url_myma(top, audio_names, url_dict),
|
| 89 |
+
}
|
| 90 |
+
)
|
| 91 |
+
except:
|
| 92 |
+
print(f"Error with {file}")
|
| 93 |
+
print(traceback.format_exc())
|
| 94 |
|
| 95 |
print("Total time : ", time.time() - a)
|
| 96 |
return output_csv, formated
|