next-playground commited on
Commit
06bb955
·
verified ·
1 Parent(s): 7678bba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,7 +6,6 @@ import uuid
6
  from pathlib import Path
7
  import threading
8
  import time
9
- import traceback
10
 
11
  separator = Separator()
12
 
@@ -131,7 +130,7 @@ def process_audio_separation(task_id, mp3_url):
131
  try:
132
  # 下载MP3文件到本地
133
  response = requests.get(mp3_url)
134
- if response.code != 200:
135
  raise Exception("无效的 URL")
136
  mp3_filename = mp3_url.split('/')[-1]
137
  with open("/tmp/" + mp3_filename, 'wb') as f:
@@ -164,8 +163,7 @@ def process_audio_separation(task_id, mp3_url):
164
  except Exception as e:
165
  tasks[task_id] = {
166
  "status": "error",
167
- "message": str(e),
168
- "debug_traceback": str(traceback.format_exception())
169
  }
170
 
171
  app = Flask(__name__)
 
6
  from pathlib import Path
7
  import threading
8
  import time
 
9
 
10
  separator = Separator()
11
 
 
130
  try:
131
  # 下载MP3文件到本地
132
  response = requests.get(mp3_url)
133
+ if response.status_code != 200:
134
  raise Exception("无效的 URL")
135
  mp3_filename = mp3_url.split('/')[-1]
136
  with open("/tmp/" + mp3_filename, 'wb') as f:
 
163
  except Exception as e:
164
  tasks[task_id] = {
165
  "status": "error",
166
+ "message": str(e)
 
167
  }
168
 
169
  app = Flask(__name__)