Spaces:
Running
Running
jhj0517
commited on
Commit
·
f57fb14
1
Parent(s):
a2455e3
Add temp file cleaning logic
Browse files
modules/whisper/whisper_base.py
CHANGED
|
@@ -356,6 +356,9 @@ class WhisperBase(ABC):
|
|
| 356 |
)
|
| 357 |
result_str = f"Done in {self.format_time(time_for_task)}! Subtitle file is in the outputs folder.\n\n{subtitle}"
|
| 358 |
|
|
|
|
|
|
|
|
|
|
| 359 |
return [result_str, result_file_path]
|
| 360 |
|
| 361 |
except Exception as e:
|
|
|
|
| 356 |
)
|
| 357 |
result_str = f"Done in {self.format_time(time_for_task)}! Subtitle file is in the outputs folder.\n\n{subtitle}"
|
| 358 |
|
| 359 |
+
if os.path.exists(audio):
|
| 360 |
+
os.remove(audio)
|
| 361 |
+
|
| 362 |
return [result_str, result_file_path]
|
| 363 |
|
| 364 |
except Exception as e:
|