Commit
·
5783f33
1
Parent(s):
c4df34b
28. Sept. 2024, 12:39
Browse files
app.py
CHANGED
|
@@ -12,8 +12,12 @@ gr.set_static_paths(paths=["_res", "_res/assets/"])
|
|
| 12 |
custom_css = RES + "/_custom.css"
|
| 13 |
custom_js = RES + "/_custom.js"
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
model_canny = None
|
|
@@ -274,7 +278,8 @@ theme = gr.themes.Soft(
|
|
| 274 |
neutral_hue=gr.themes.Color(c100="#a6adc8", c200="#9399b2", c300="#7f849c", c400="#6c7086", c50="#cdd6f4", c500="#585b70", c600="#45475a", c700="#313244", c800="#1e1e2e", c900="#181825", c950="#11111b"),
|
| 275 |
)
|
| 276 |
|
| 277 |
-
|
|
|
|
| 278 |
with gr.Row(elem_classes="row-header"):
|
| 279 |
gr.Markdown(
|
| 280 |
f"""
|
|
@@ -324,7 +329,7 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js) as demo:
|
|
| 324 |
# Das Tutorial kommt bald.
|
| 325 |
"""
|
| 326 |
)
|
| 327 |
-
|
| 328 |
# MARK: Button Runs
|
| 329 |
run_btn_lineart.click(fn=lineart, inputs=[input_image, resolution, preprocessor_name, invert, gallery], outputs=[gallery])
|
| 330 |
run_btn_canny.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold, gallery], outputs=[gallery])
|
|
|
|
| 12 |
custom_css = RES + "/_custom.css"
|
| 13 |
custom_js = RES + "/_custom.js"
|
| 14 |
|
| 15 |
+
custom_head = f"""
|
| 16 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css"/>
|
| 17 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/js/all.min.js"></script>
|
| 18 |
+
"""
|
| 19 |
|
| 20 |
+
title = "ControlNet v1.1 Preprocessors Standalone"
|
| 21 |
|
| 22 |
|
| 23 |
model_canny = None
|
|
|
|
| 278 |
neutral_hue=gr.themes.Color(c100="#a6adc8", c200="#9399b2", c300="#7f849c", c400="#6c7086", c50="#cdd6f4", c500="#585b70", c600="#45475a", c700="#313244", c800="#1e1e2e", c900="#181825", c950="#11111b"),
|
| 279 |
)
|
| 280 |
|
| 281 |
+
# MARK: GRADIO UI
|
| 282 |
+
with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, title=title) as demo:
|
| 283 |
with gr.Row(elem_classes="row-header"):
|
| 284 |
gr.Markdown(
|
| 285 |
f"""
|
|
|
|
| 329 |
# Das Tutorial kommt bald.
|
| 330 |
"""
|
| 331 |
)
|
| 332 |
+
|
| 333 |
# MARK: Button Runs
|
| 334 |
run_btn_lineart.click(fn=lineart, inputs=[input_image, resolution, preprocessor_name, invert, gallery], outputs=[gallery])
|
| 335 |
run_btn_canny.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold, gallery], outputs=[gallery])
|