Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -630,6 +630,7 @@ async def get_results(task_id: str):
|
|
| 630 |
result = task.get("result")
|
| 631 |
if result and all(k in result for k in ("fileName", "duration", "audioPath")):
|
| 632 |
#clearing cache
|
|
|
|
| 633 |
for file_path in download_cache.values():
|
| 634 |
if os.path.exists(file_path):
|
| 635 |
os.remove(file_path)
|
|
@@ -637,6 +638,7 @@ async def get_results(task_id: str):
|
|
| 637 |
|
| 638 |
return {"status": "completed", **result}
|
| 639 |
else:
|
|
|
|
| 640 |
# If result is missing fields, mark as still processing
|
| 641 |
return {"status": "processing"}
|
| 642 |
|
|
|
|
| 630 |
result = task.get("result")
|
| 631 |
if result and all(k in result for k in ("fileName", "duration", "audioPath")):
|
| 632 |
#clearing cache
|
| 633 |
+
print(f"all fields are available {result}")
|
| 634 |
for file_path in download_cache.values():
|
| 635 |
if os.path.exists(file_path):
|
| 636 |
os.remove(file_path)
|
|
|
|
| 638 |
|
| 639 |
return {"status": "completed", **result}
|
| 640 |
else:
|
| 641 |
+
print(f"missing field {result}")
|
| 642 |
# If result is missing fields, mark as still processing
|
| 643 |
return {"status": "processing"}
|
| 644 |
|