Skip to content

Commit 01170ef

Browse files
necrouasergii.kostiuk
authored and
sergii.kostiuk
committed
add header, title, favicon
1 parent 89f9faa commit 01170ef

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

favicon.ico

962 Bytes
Binary file not shown.

javascript/progressbar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ function formatTime(secs){
4646
}
4747

4848
function setTitle(progress){
49-
var title = 'Stable Diffusion'
49+
var title = 'Talkable Art Terminal, powered by Stable Diffusion'
5050

5151
if(opts.show_progress_in_title && progress){
52-
title = '[' + progress.trim() + '] ' + title;
52+
title = window.TkblBoxName + ': [' + progress.trim() + '] ' + title;
53+
} else{
54+
title = window.TkblBoxName + ': ' + title;
5355
}
5456

5557
if(document.title != title){

modules/ui.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ def update_interp_description(value):
11891189
process_focal_crop_entropy_weight = gr.Slider(label='Focal point entropy weight', value=0.15, minimum=0.0, maximum=1.0, step=0.05, elem_id="train_process_focal_crop_entropy_weight")
11901190
process_focal_crop_edges_weight = gr.Slider(label='Focal point edges weight', value=0.5, minimum=0.0, maximum=1.0, step=0.05, elem_id="train_process_focal_crop_edges_weight")
11911191
process_focal_crop_debug = gr.Checkbox(label='Create debug image', elem_id="train_process_focal_crop_debug")
1192-
1192+
11931193
with gr.Column(visible=False) as process_multicrop_col:
11941194
gr.Markdown('Each image is center-cropped with an automatically chosen width and height.')
11951195
with gr.Row():
@@ -1201,7 +1201,7 @@ def update_interp_description(value):
12011201
with gr.Row():
12021202
process_multicrop_objective = gr.Radio(["Maximize area", "Minimize error"], value="Maximize area", label="Resizing objective", elem_id="train_process_multicrop_objective")
12031203
process_multicrop_threshold = gr.Slider(minimum=0, maximum=1, step=0.01, label="Error threshold", value=0.1, elem_id="train_process_multicrop_threshold")
1204-
1204+
12051205
with gr.Row():
12061206
with gr.Column(scale=3):
12071207
gr.HTML(value="")
@@ -1244,7 +1244,7 @@ def get_textual_inversion_template_names():
12441244
with FormRow():
12451245
embedding_learn_rate = gr.Textbox(label='Embedding Learning rate', placeholder="Embedding Learning rate", value="0.005", elem_id="train_embedding_learn_rate")
12461246
hypernetwork_learn_rate = gr.Textbox(label='Hypernetwork Learning rate', placeholder="Hypernetwork Learning rate", value="0.00001", elem_id="train_hypernetwork_learn_rate")
1247-
1247+
12481248
with FormRow():
12491249
clip_grad_mode = gr.Dropdown(value="disabled", label="Gradient Clipping", choices=["disabled", "value", "norm"])
12501250
clip_grad_value = gr.Textbox(placeholder="Gradient clip value", value="0.1", show_label=False)
@@ -1578,7 +1578,7 @@ def run_settings_single(value, key):
15781578
gr.HTML(shared.html("licenses.html"), elem_id="licenses")
15791579

15801580
gr.Button(value="Show all pages", elem_id="settings_show_all_pages")
1581-
1581+
15821582

15831583
def unload_sd_weights():
15841584
modules.sd_models.unload_model_weights()
@@ -1652,7 +1652,9 @@ def request_restart():
16521652
for _interface, label, _ifid in interfaces:
16531653
shared.tab_names.append(label)
16541654

1655-
with gr.Blocks(theme=shared.gradio_theme, analytics_enabled=False, title="Stable Diffusion") as demo:
1655+
with gr.Blocks(theme=shared.gradio_theme, analytics_enabled=False, title="Talkable Art Box") as demo:
1656+
with gr.Row(elem_id="talkable_header"):
1657+
gr.HTML(value="<img src=\"https://curebit-staging.s3.amazonaws.com/talkable-art-terminal-light-logo.png\" style=\"height: 32px\" class=\"mb-4 px-2\">")
16561658
with gr.Row(elem_id="quicksettings", variant="compact"):
16571659
for i, k, item in sorted(quicksettings_list, key=lambda x: quicksettings_names.get(x[1], x[0])):
16581660
component = create_setting_component(k, is_quicksettings=True)
@@ -1877,6 +1879,9 @@ def javascript_html():
18771879

18781880
if cmd_opts.theme:
18791881
head += f'<script type="text/javascript">set_theme(\"{cmd_opts.theme}\");</script>\n'
1882+
with open('/etc/hostname', 'r') as file:
1883+
hostname = file.read().strip()
1884+
head += f"<script>window.TkblBoxName = '{hostname}'</script>\n"
18801885

18811886
return head
18821887

webui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ def fastapi_setup(self):
323323
ssl_keyfile=cmd_opts.tls_keyfile,
324324
ssl_certfile=cmd_opts.tls_certfile,
325325
ssl_verify=cmd_opts.disable_tls_verify,
326+
favicon_path="favicon.ico",
326327
debug=cmd_opts.gradio_debug,
327328
auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None,
328329
inbrowser=cmd_opts.autolaunch,

0 commit comments

Comments
 (0)