binaychandra commited on
Commit
1513d3f
·
1 Parent(s): da572dc

wsgi changes

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. wsgi.py +6 -2
requirements.txt CHANGED
@@ -3,4 +3,4 @@ Werkzeug>=2.3.7
3
  numpy>=1.25.0
4
  Pillow>=10.0.0
5
  scipy>=1.10.1
6
- uvicorn>=0.23.0
 
3
  numpy>=1.25.0
4
  Pillow>=10.0.0
5
  scipy>=1.10.1
6
+ uvicorn[standard]>=0.23.0
wsgi.py CHANGED
@@ -1,7 +1,11 @@
1
  from app import app
 
 
 
 
 
2
 
3
  if __name__ == "__main__":
4
  # This block will be executed when running this file directly
5
  # Useful for local development with: python wsgi.py
6
- import uvicorn
7
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
1
  from app import app
2
+ import uvicorn
3
+ from uvicorn.middleware.wsgi import WSGIMiddleware
4
+
5
+ # Create ASGI app by wrapping the Flask WSGI app
6
+ asgi_app = WSGIMiddleware(app)
7
 
8
  if __name__ == "__main__":
9
  # This block will be executed when running this file directly
10
  # Useful for local development with: python wsgi.py
11
+ uvicorn.run(asgi_app, host="0.0.0.0", port=7860)