Skip to content

Commit

Permalink
[RETURN BOTH]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Apr 16, 2024
1 parent e844671 commit 26276b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions text_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ async def create_chat_completion(
media_type="image/gif",
filename=request.output_path
)

return 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
except Exception as e:
logger.error(f"Error: {e}")
raise HTTPException(status_code=500, detail="Internal Server Error")
Expand Down

0 comments on commit 26276b2

Please sign in to comment.