GitHub Actions
commited on
Commit
·
96cdd42
1
Parent(s):
9f8aa41
🚀 Auto-deploy from GitHub Actions
Browse filesDeployed from: bpmbox/AUTOCREATE
Commit: 4dbc59b9cb92e528c2a89ac9d17efa54910a4f4e
Branch: main
Workflow: 🚀 Deploy to Hugging Face Space
Updated files:
- System workflow analysis notebook
- Core Python modules
- Controllers and routers
- Documentation and configs
app.py
CHANGED
@@ -5,7 +5,6 @@ Django ASGI + FastAPI + Gradio 統合起動
|
|
5 |
app.py から asgi.py を起動してすべて統合
|
6 |
"""
|
7 |
|
8 |
-
import uvicorn
|
9 |
import os
|
10 |
import sys
|
11 |
from dotenv import load_dotenv
|
@@ -27,11 +26,10 @@ if __name__ == "__main__":
|
|
27 |
print("� Gradio Chat: http://localhost:8000/gradio")
|
28 |
print("� API Docs: http://localhost:8000/docs")
|
29 |
|
30 |
-
#
|
31 |
-
|
32 |
-
|
33 |
-
host
|
34 |
-
port
|
35 |
-
|
36 |
-
|
37 |
-
)
|
|
|
5 |
app.py から asgi.py を起動してすべて統合
|
6 |
"""
|
7 |
|
|
|
8 |
import os
|
9 |
import sys
|
10 |
from dotenv import load_dotenv
|
|
|
26 |
print("� Gradio Chat: http://localhost:8000/gradio")
|
27 |
print("� API Docs: http://localhost:8000/docs")
|
28 |
|
29 |
+
# execでプロセスを置き換えてuvicornを起動(完全にCLIと同じ挙動)
|
30 |
+
os.execv(sys.executable, [
|
31 |
+
sys.executable, '-m', 'uvicorn', 'mysite.asgi:app',
|
32 |
+
'--host', '0.0.0.0',
|
33 |
+
'--port', '8000',
|
34 |
+
'--log-level', 'info'
|
35 |
+
])
|
|