Spaces:
Running
Running
Ron Au
commited on
Commit
•
c4bd45a
1
Parent(s):
9fbb486
fix(port): Configure uvicorn port for HF Spaces
Browse files- requirements.txt +1 -1
- start.py +4 -1
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
rudalle==1.0.*
|
2 |
fastapi==0.74.*
|
3 |
uvicorn[standard]==0.17.*
|
|
|
|
|
|
1 |
fastapi==0.74.*
|
2 |
uvicorn[standard]==0.17.*
|
3 |
+
rudalle==1.0.*
|
start.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
|
2 |
import subprocess
|
3 |
|
4 |
-
subprocess.run(
|
|
|
|
|
|
|
|
1 |
|
2 |
import subprocess
|
3 |
|
4 |
+
subprocess.run(
|
5 |
+
"gunicorn app:app --workers 2 --worker-class uvicorn.workers.UvicornWorker --timeout=300 --bind 0.0.0.0:7860",
|
6 |
+
shell=True)
|
7 |
+
# subprocess.run("uvicorn app:app --port 7860", shell=True)
|