MariaKaiser commited on
Commit
94cea23
·
verified ·
1 Parent(s): 72a3a2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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