Spaces:
Paused
Paused
reverted to 45f40f81c8878b7e31a535bea706873065c51367
Browse files
webui.py
CHANGED
@@ -21,15 +21,10 @@ import torch
|
|
21 |
from modules.sdxl_styles import legal_style_names
|
22 |
from modules.private_logger import get_current_html_path
|
23 |
from modules.ui_gradio_extensions import reload_javascript
|
|
|
24 |
from modules.auth import auth_enabled, check_auth
|
25 |
from modules.util import is_json
|
26 |
|
27 |
-
from fastapi import FastAPI
|
28 |
-
from fastapi.responses import (HTMLResponse, JSONResponse)
|
29 |
-
import uvicorn
|
30 |
-
|
31 |
-
app = FastAPI()
|
32 |
-
|
33 |
def ini_args():
|
34 |
from args_manager import args
|
35 |
return args
|
@@ -122,7 +117,7 @@ else:
|
|
122 |
power_device = "CPU"
|
123 |
|
124 |
with shared.gradio_root:
|
125 |
-
gr.
|
126 |
with gr.Tab("DALL-E"):
|
127 |
with gr.Row(variant="panel"):
|
128 |
model = gr.Dropdown(choices=["dall-e-2", "dall-e-3"], label="Model", value="dall-e-3")
|
@@ -759,7 +754,7 @@ dump_default_english_config()
|
|
759 |
|
760 |
print(f'Starting Gradio... with {args_manager.args}')
|
761 |
|
762 |
-
|
763 |
""" shared.gradio_root.launch(
|
764 |
inbrowser=args_manager.args.in_browser,
|
765 |
server_name=args_manager.args.listen,
|
@@ -769,13 +764,4 @@ print(f'Starting Gradio... with {args_manager.args}')
|
|
769 |
allowed_paths=[modules.config.path_outputs],
|
770 |
blocked_paths=[constants.AUTH_FILENAME]
|
771 |
)
|
772 |
-
"""
|
773 |
-
|
774 |
-
@app.get("/health", response_class=JSONResponse)
|
775 |
-
def health():
|
776 |
-
return JSONResponse({'status': 'ok'})
|
777 |
-
|
778 |
-
app = gr.mount_gradio_app(app, shared.gradio_root, path="/")
|
779 |
-
|
780 |
-
|
781 |
-
uvicorn.run(app)
|
|
|
21 |
from modules.sdxl_styles import legal_style_names
|
22 |
from modules.private_logger import get_current_html_path
|
23 |
from modules.ui_gradio_extensions import reload_javascript
|
24 |
+
from modules.ui_gradio_extensions import zStudiosHeader
|
25 |
from modules.auth import auth_enabled, check_auth
|
26 |
from modules.util import is_json
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
def ini_args():
|
29 |
from args_manager import args
|
30 |
return args
|
|
|
117 |
power_device = "CPU"
|
118 |
|
119 |
with shared.gradio_root:
|
120 |
+
gr.HTML(zStudiosHeader(power_device))
|
121 |
with gr.Tab("DALL-E"):
|
122 |
with gr.Row(variant="panel"):
|
123 |
model = gr.Dropdown(choices=["dall-e-2", "dall-e-3"], label="Model", value="dall-e-3")
|
|
|
754 |
|
755 |
print(f'Starting Gradio... with {args_manager.args}')
|
756 |
|
757 |
+
shared.gradio_root.launch(debug=True)
|
758 |
""" shared.gradio_root.launch(
|
759 |
inbrowser=args_manager.args.in_browser,
|
760 |
server_name=args_manager.args.listen,
|
|
|
764 |
allowed_paths=[modules.config.path_outputs],
|
765 |
blocked_paths=[constants.AUTH_FILENAME]
|
766 |
)
|
767 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|