From 1ba8e61fd480b0de5a8c2b109f0e6f417ae74077 Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 16 Apr 2024 17:20:39 -0400 Subject: [PATCH] [SAVEDFILE] --- text_to_video.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/text_to_video.py b/text_to_video.py index 48a4368..139bc3e 100644 --- a/text_to_video.py +++ b/text_to_video.py @@ -140,14 +140,9 @@ async def create_chat_completion( # logger.info(f"Response: {out}") logger.info(f"Downloading the file: {response}") - FileResponse( - response, - media_type="image/gif", - filename=request.output_path - ) - out = JSONResponse(content=log.model_dump(), status_code=200) + # out = JSONResponse(content=log.model_dump(), status_code=200) saved_file = FileResponse(response, media_type="image/gif", filename=request.output_path) - return out, saved_file + return saved_file except Exception as e: logger.error(f"Error: {e}") raise HTTPException(status_code=500, detail="Internal Server Error")