-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiffuser-dials.py
More file actions
42 lines (35 loc) · 996 Bytes
/
Copy pathdiffuser-dials.py
File metadata and controls
42 lines (35 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import gradio as gr
import PIL.Image as Image
from config import paths, args, head_style, APP_NAME
from gallery_ui import outputgallery
def ui() -> gr.Blocks:
with gr.Blocks(
css=paths.stylesheet,
head=head_style,
analytics_enabled=False,
title=APP_NAME,
delete_cache=(7200, 7200),
) as diffuser_dials:
logo = Image.open(paths.images / "logo-medium.png")
gr.Image(
value=logo,
show_label=False,
interactive=False,
elem_id="tab_bar_logo",
show_download_button=False,
)
with gr.Tab("Gallery"):
outputgallery.render()
return diffuser_dials
if __name__ == "__main__":
ui().launch(
share=False,
server_name=args.host,
server_port=args.port,
favicon_path=paths.images / "logo-icon.png",
allowed_paths=paths.output_dir,
show_api=False,
inbrowser=True,
)
else:
demo = ui()