Spaces:
Build error
Build error
change cutout directory to avoid collision with input files
Browse files- .vscode/settings.json +14 -0
- README.md +4 -0
- main.py +1 -1
.vscode/settings.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"files.exclude": {
|
| 3 |
+
"**/.git": true,
|
| 4 |
+
"**/.svn": true,
|
| 5 |
+
"**/.hg": true,
|
| 6 |
+
"**/CVS": true,
|
| 7 |
+
"**/.DS_Store": true,
|
| 8 |
+
"**/Thumbs.db": true,
|
| 9 |
+
"**/.retool_types/**": true,
|
| 10 |
+
"**/*tsconfig.json": true,
|
| 11 |
+
".cache": true,
|
| 12 |
+
"retool.config.json": true
|
| 13 |
+
}
|
| 14 |
+
}
|
README.md
CHANGED
|
@@ -8,3 +8,7 @@ pinned: false
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 11 |
+
|
| 12 |
+
##TODO:
|
| 13 |
+
[] add temporary dir clearing
|
| 14 |
+
[] connect with frontentd implementation
|
main.py
CHANGED
|
@@ -94,7 +94,7 @@ async def cut_audio(request: CutRequestInput):
|
|
| 94 |
|
| 95 |
raise HTTPException(status_code=500, detail=str(e))
|
| 96 |
try:
|
| 97 |
-
s3_output_key = f'{aws_env}/{cut_request.news_id}/quote_segment_{i}.mp3'
|
| 98 |
s3_client.upload_file(output_file, s3_bucket_name, s3_output_key)
|
| 99 |
except Exception as e:
|
| 100 |
logger.error(f"S3 Upload Error: {str(e)}")
|
|
|
|
| 94 |
|
| 95 |
raise HTTPException(status_code=500, detail=str(e))
|
| 96 |
try:
|
| 97 |
+
s3_output_key = f'cut_outs/{aws_env}/{cut_request.news_id}/quote_segment_{i}.mp3'
|
| 98 |
s3_client.upload_file(output_file, s3_bucket_name, s3_output_key)
|
| 99 |
except Exception as e:
|
| 100 |
logger.error(f"S3 Upload Error: {str(e)}")
|