Spaces:
Runtime error
Runtime error
Commit
·
a741e24
1
Parent(s):
a00a8e9
Update app.py
Browse files
app.py
CHANGED
@@ -139,6 +139,8 @@ if __name__ == "__main__":
|
|
139 |
|
140 |
def transcribe_chunked_audio(inputs, task, return_timestamps, progress=gr.Progress()):
|
141 |
progress(0, desc="Loading audio file...")
|
|
|
|
|
142 |
file_size_mb = os.stat(inputs).st_size / (1024 * 1024)
|
143 |
if file_size_mb > FILE_LIMIT_MB:
|
144 |
raise gr.Error(
|
|
|
139 |
|
140 |
def transcribe_chunked_audio(inputs, task, return_timestamps, progress=gr.Progress()):
|
141 |
progress(0, desc="Loading audio file...")
|
142 |
+
if inputs is None:
|
143 |
+
raise gr.Error("No audio file submitted! Please upload an audio file before submitting your request.")
|
144 |
file_size_mb = os.stat(inputs).st_size / (1024 * 1024)
|
145 |
if file_size_mb > FILE_LIMIT_MB:
|
146 |
raise gr.Error(
|