fmab777 commited on
Commit
7e7c7e6
·
verified ·
1 Parent(s): 5999508

Update gunicorn.conf.py

Browse files
Files changed (1) hide show
  1. gunicorn.conf.py +5 -4
gunicorn.conf.py CHANGED
@@ -1,11 +1,12 @@
1
- # gunicorn.conf.py
2
  import os
3
 
4
  worker_class = 'uvicorn.workers.UvicornWorker'
5
  workers = int(os.environ.get('GUNICORN_WORKERS', '1'))
6
- bind = f"0.0.0.0:{os.environ.get('PORT', '7860')}"
 
 
7
 
8
- # Timeout should be longer than the longest expected API call (e.g., OpenRouter 180s)
9
  timeout = 200 # 200 seconds
10
 
11
- # loglevel = 'info'
 
 
1
  import os
2
 
3
  worker_class = 'uvicorn.workers.UvicornWorker'
4
  workers = int(os.environ.get('GUNICORN_WORKERS', '1'))
5
+ # Use the PORT environment variable set by Hugging Face or default
6
+ port = os.environ.get('PORT', '7860')
7
+ bind = f"0.0.0.0:{port}"
8
 
9
+ # Timeout should be longer than the longest expected API call (e.g., OpenRouter/Crawl4AI)
10
  timeout = 200 # 200 seconds
11
 
12
+ loglevel = 'info'