Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files- mysite/asgi.py +3 -2
- requirements.txt +2 -1
mysite/asgi.py
CHANGED
@@ -16,6 +16,7 @@ import mysite.interpreter.interpreter_config # インポートするだけで
|
|
16 |
# ロガーの設定
|
17 |
from mysite.logger import logger
|
18 |
import threading
|
|
|
19 |
|
20 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
|
21 |
application = get_asgi_application()
|
@@ -47,7 +48,7 @@ setup_database_routes(app)
|
|
47 |
|
48 |
|
49 |
# Gradioアプリのマウント
|
50 |
-
app.mount("/templates", StaticFiles(directory="templates"
|
51 |
|
52 |
# テンプレートファイルが格納されているディレクトリを指定
|
53 |
templates = Jinja2Templates(directory="templates")
|
@@ -56,7 +57,7 @@ templates = Jinja2Templates(directory="templates")
|
|
56 |
def get_some_page(request: Request):
|
57 |
return templates.TemplateResponse("index.html", {"request": request})
|
58 |
|
59 |
-
|
60 |
app = gr.mount_gradio_app(app, gradio_interfaces, "/")
|
61 |
|
62 |
|
|
|
16 |
# ロガーの設定
|
17 |
from mysite.logger import logger
|
18 |
import threading
|
19 |
+
import aiofiles
|
20 |
|
21 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
|
22 |
application = get_asgi_application()
|
|
|
48 |
|
49 |
|
50 |
# Gradioアプリのマウント
|
51 |
+
app.mount("/templates", StaticFiles(directory="templates"), name="templates")
|
52 |
|
53 |
# テンプレートファイルが格納されているディレクトリを指定
|
54 |
templates = Jinja2Templates(directory="templates")
|
|
|
57 |
def get_some_page(request: Request):
|
58 |
return templates.TemplateResponse("index.html", {"request": request})
|
59 |
|
60 |
+
|
61 |
app = gr.mount_gradio_app(app, gradio_interfaces, "/")
|
62 |
|
63 |
|
requirements.txt
CHANGED
@@ -42,4 +42,5 @@ tzdata==2024.1 ; python_version >= "3.10" and python_version < "4.0" and sys_pla
|
|
42 |
uvloop==0.19.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32"
|
43 |
whitenoise==6.6.0 ; python_version >= "3.10" and python_version < "4.0"
|
44 |
llamafactory
|
45 |
-
gradio==4.31.5
|
|
|
|
42 |
uvloop==0.19.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32"
|
43 |
whitenoise==6.6.0 ; python_version >= "3.10" and python_version < "4.0"
|
44 |
llamafactory
|
45 |
+
gradio==4.31.5
|
46 |
+
aiofiles
|