Skip to content

Commit

Permalink
[SAVEDFILE]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Apr 16, 2024
1 parent 26276b2 commit 1ba8e61
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions text_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1ba8e61

Please sign in to comment.