Commit
·
91ded52
1
Parent(s):
be84fc9
28. Sept. 2024, 18:44
Browse files
app.py
CHANGED
|
@@ -321,21 +321,23 @@ with gr.Blocks(theme=theme, css=custom_css, js=custom_js, head=custom_head, titl
|
|
| 321 |
preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
|
| 322 |
|
| 323 |
invert = gr.Checkbox(label="Farbe invertieren?", info=invert_toggle_info[0], value=True, elem_classes="toggle-btn")
|
| 324 |
-
resolution = gr.Slider(label="Auflösung", minimum=256, maximum=1024, value=512, step=64)
|
| 325 |
invert.change(lambda x: {"info": invert_toggle_info[0] if x else invert_toggle_info[1], "__type__": "update"}, inputs=invert, outputs=invert)
|
| 326 |
|
| 327 |
## TAB Canny
|
| 328 |
with gr.Tab("Canny Edge") as tab_canny:
|
| 329 |
-
with gr.Row():
|
| 330 |
-
|
| 331 |
with gr.Row():
|
| 332 |
with gr.Column():
|
| 333 |
-
low_threshold = gr.Slider(label="
|
| 334 |
-
high_threshold = gr.Slider(label="
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
|
|
|
|
|
|
| 339 |
|
| 340 |
all_run_btns = [run_btn_lineart, run_btn_canny]
|
| 341 |
|
|
|
|
| 321 |
preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
|
| 322 |
|
| 323 |
invert = gr.Checkbox(label="Farbe invertieren?", info=invert_toggle_info[0], value=True, elem_classes="toggle-btn")
|
| 324 |
+
# resolution = gr.Slider(label="Auflösung", minimum=256, maximum=1024, value=512, step=64)
|
| 325 |
invert.change(lambda x: {"info": invert_toggle_info[0] if x else invert_toggle_info[1], "__type__": "update"}, inputs=invert, outputs=invert)
|
| 326 |
|
| 327 |
## TAB Canny
|
| 328 |
with gr.Tab("Canny Edge") as tab_canny:
|
| 329 |
+
# with gr.Row():
|
| 330 |
+
# gr.Markdown("## Canny Edge")
|
| 331 |
with gr.Row():
|
| 332 |
with gr.Column():
|
| 333 |
+
low_threshold = gr.Slider(label="niedriger Schwellenwert", minimum=1, maximum=255, value=100, step=1)
|
| 334 |
+
high_threshold = gr.Slider(label="hoher Schwellenwert", minimum=1, maximum=255, value=200, step=1)
|
| 335 |
+
|
| 336 |
+
with gr.Row():
|
| 337 |
+
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 338 |
+
with gr.Row():
|
| 339 |
+
run_btn_lineart = gr.Button("Los", variant="primary", visible=True)
|
| 340 |
+
run_btn_canny = gr.Button("Los", variant="primary", visible=False)
|
| 341 |
|
| 342 |
all_run_btns = [run_btn_lineart, run_btn_canny]
|
| 343 |
|