ginipick commited on
Commit
2871992
·
verified ·
1 Parent(s): f4e1cfc

Update src/main.py

Browse files
Files changed (1) hide show
  1. src/main.py +8 -0
src/main.py CHANGED
@@ -324,5 +324,13 @@ def download_video(gloss_sentence: str):
324
  logger.error(f"Video download error: {str(e)}")
325
  return f"Error downloading video: {str(e)}", 500
326
 
 
327
  if __name__ == "__main__":
328
  app.run(host="0.0.0.0", port=7860, debug=True)
 
 
 
 
 
 
 
 
324
  logger.error(f"Video download error: {str(e)}")
325
  return f"Error downloading video: {str(e)}", 500
326
 
327
+ # 만약 main.py를 직접 실행하는 경우(개발 환경)
328
  if __name__ == "__main__":
329
  app.run(host="0.0.0.0", port=7860, debug=True)
330
+
331
+ # ---------------------------------------------------------------------
332
+ # Gunicorn 설정을 main.py 파일 내에 포함 (Gunicorn 실행 시 -c 옵션으로 사용)
333
+ # 아래 변수들은 Gunicorn이 main.py를 설정 파일로 사용할 경우 적용됩니다.
334
+ bind = "0.0.0.0:7860"
335
+ workers = 4
336
+ timeout = 120 # worker timeout을 120초로 설정