Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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())
|