fomext commited on
Commit
c77ac80
·
verified ·
1 Parent(s): f53d0e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -101,7 +101,10 @@ async def separate_audio(
101
  raise HTTPException(400, "quality must be low, medium, or high")
102
 
103
  job_id = uuid.uuid4().hex
104
- input_path = os.path.join(UPLOAD_DIR, f"{job_id}_{file.filename}")
 
 
 
105
 
106
  with open(input_path, "wb") as f:
107
  f.write(await file.read())
 
101
  raise HTTPException(400, "quality must be low, medium, or high")
102
 
103
  job_id = uuid.uuid4().hex
104
+
105
+ safe_name = os.path.basename(file.filename)
106
+ input_path = os.path.join(UPLOAD_DIR, f"{job_id}_{safe_name}")
107
+
108
 
109
  with open(input_path, "wb") as f:
110
  f.write(await file.read())