Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -296,10 +296,6 @@ inference_model = InferenceModel('/home/user/app/checkpoints/mt3/', 'mt3')
|
|
296 |
|
297 |
|
298 |
def inference(audio):
|
299 |
-
mime_type, _ = mimetypes.guess_type(audio)
|
300 |
-
if not mime_type.startswith('audio'):
|
301 |
-
raise ValueError(f"文件 {audio} 不是有效的音频文件")
|
302 |
-
|
303 |
filename = os.path.basename(audio) # 获取输入文件的文件名
|
304 |
print(f"[{current_time()}] 运行:输入文件: {filename}")
|
305 |
with open(audio, 'rb') as fd:
|
|
|
296 |
|
297 |
|
298 |
def inference(audio):
|
|
|
|
|
|
|
|
|
299 |
filename = os.path.basename(audio) # 获取输入文件的文件名
|
300 |
print(f"[{current_time()}] 运行:输入文件: {filename}")
|
301 |
with open(audio, 'rb') as fd:
|