Pepguy commited on
Commit
727613b
·
verified ·
1 Parent(s): 2fa21b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -33,6 +33,9 @@ async def process(req: VideoJsonRequest):
33
  txt = whisper_model.transcribe(a_p)["text"].strip()
34
  f_names = sorted([f"{tmp}/{f}" for f in os.listdir(tmp) if f.startswith("f_")])
35
  imgs = [to_b64(f) for f in f_names]
 
 
 
36
  return {"success": True, "transcript": txt, "frames": imgs, "thumbnail": imgs[0] if imgs else None}
37
  except Exception as e: return {"success": False, "error": str(e)}
38
  finally: shutil.rmtree(tmp, ignore_errors=True)
 
33
  txt = whisper_model.transcribe(a_p)["text"].strip()
34
  f_names = sorted([f"{tmp}/{f}" for f in os.listdir(tmp) if f.startswith("f_")])
35
  imgs = [to_b64(f) for f in f_names]
36
+ print("-------------------")
37
+ print(f"length={len(imgs)}")
38
+ print("-------------------")
39
  return {"success": True, "transcript": txt, "frames": imgs, "thumbnail": imgs[0] if imgs else None}
40
  except Exception as e: return {"success": False, "error": str(e)}
41
  finally: shutil.rmtree(tmp, ignore_errors=True)