Spaces:
Runtime error
Runtime error
Update flask_api_full_song.py
Browse files- flask_api_full_song.py +1 -0
flask_api_full_song.py
CHANGED
|
@@ -116,6 +116,7 @@ def wav2wav():
|
|
| 116 |
tasks[task_id] = {"status": "processing"}
|
| 117 |
audio_result = requests.get(request.args.get('audio_path'))
|
| 118 |
if audio_result.status_code != 200:
|
|
|
|
| 119 |
raise Exception("无效的 URL")
|
| 120 |
with open("/tmp/" + request.args.get("audio_path", "").split('/')[-1], 'wb') as f:
|
| 121 |
f.write(audio_result.content)
|
|
|
|
| 116 |
tasks[task_id] = {"status": "processing"}
|
| 117 |
audio_result = requests.get(request.args.get('audio_path'))
|
| 118 |
if audio_result.status_code != 200:
|
| 119 |
+
print("audio result status code as ", audio_result.status_code, " because of ", str(audio_result.content))
|
| 120 |
raise Exception("无效的 URL")
|
| 121 |
with open("/tmp/" + request.args.get("audio_path", "").split('/')[-1], 'wb') as f:
|
| 122 |
f.write(audio_result.content)
|