Spaces:
Running
Running
ruff format
Browse files
app.py
CHANGED
|
@@ -85,7 +85,9 @@ def inference_func(wav_file, min_sec, max_sec):
|
|
| 85 |
raise gr.Error("The duration is too low")
|
| 86 |
n_channels = len(data)
|
| 87 |
if n_channels > 1:
|
| 88 |
-
raise gr.Error(
|
|
|
|
|
|
|
| 89 |
except Exception as e:
|
| 90 |
raise gr.Error(f"Can't read your file, the problem: {e}")
|
| 91 |
|
|
|
|
| 85 |
raise gr.Error("The duration is too low")
|
| 86 |
n_channels = len(data)
|
| 87 |
if n_channels > 1:
|
| 88 |
+
raise gr.Error(
|
| 89 |
+
f"Your file must be in the mono format. The file has {n_channels} channels."
|
| 90 |
+
)
|
| 91 |
except Exception as e:
|
| 92 |
raise gr.Error(f"Can't read your file, the problem: {e}")
|
| 93 |
|