Spaces:
Runtime error
Runtime error
Update gradio_ui.py
Browse files- gradio_ui.py +9 -20
gradio_ui.py
CHANGED
|
@@ -287,8 +287,14 @@ def get_image_paths(folder_path):
|
|
| 287 |
image_paths.append([os.path.join(folder_path, filename)])
|
| 288 |
return image_paths
|
| 289 |
|
| 290 |
-
|
| 291 |
def create_interface():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
controlnet_model_dict = {
|
| 293 |
"sdxl-light-caption-30000": "sdxl_light_caption_output/checkpoint-30000/controlnet",
|
| 294 |
"sdxl-light-custom-caption-30000": "sdxl_light_custom_caption_output/checkpoint-30000/controlnet",
|
|
@@ -320,11 +326,6 @@ def create_interface():
|
|
| 320 |
],
|
| 321 |
examples=images,
|
| 322 |
additional_inputs=[
|
| 323 |
-
# gr.Radio(choices=["Original", "Square"], value="Original",
|
| 324 |
-
# label="Output resolution"),
|
| 325 |
-
# gr.Slider(minimum=128, maximum=512, value=256, step=128,
|
| 326 |
-
# label="Height & Width",
|
| 327 |
-
# info='Only effect if select "Square" output resolution'),
|
| 328 |
gr.Slider(0, 1000, 123, label="Seed"),
|
| 329 |
gr.Radio(choices=[1, 2, 4, 8],
|
| 330 |
value=8,
|
|
@@ -364,24 +365,12 @@ def create_interface():
|
|
| 364 |
],
|
| 365 |
title="ColorRevive",
|
| 366 |
description="Restore a black-and-white photo to color",
|
|
|
|
|
|
|
| 367 |
cache_examples=False
|
| 368 |
)
|
| 369 |
return interface
|
| 370 |
|
| 371 |
-
def create_interface():
|
| 372 |
-
css = """
|
| 373 |
-
footer {
|
| 374 |
-
visibility: hidden;
|
| 375 |
-
}
|
| 376 |
-
"""
|
| 377 |
-
|
| 378 |
-
# ν
λ§μ CSSλ₯Ό μΈν°νμ΄μ€ μμ± μ μ€μ
|
| 379 |
-
interface = gr.Interface(
|
| 380 |
-
# ... κΈ°μ‘΄ νλΌλ―Έν°λ€ ...
|
| 381 |
-
theme="Yntec/HaleyCH_Theme_Orange",
|
| 382 |
-
css=css
|
| 383 |
-
)
|
| 384 |
-
return interface
|
| 385 |
|
| 386 |
def main():
|
| 387 |
# launch()μμλ ν
λ§ μ€μ μ μ κ±°
|
|
|
|
| 287 |
image_paths.append([os.path.join(folder_path, filename)])
|
| 288 |
return image_paths
|
| 289 |
|
| 290 |
+
|
| 291 |
def create_interface():
|
| 292 |
+
css = """
|
| 293 |
+
footer {
|
| 294 |
+
visibility: hidden;
|
| 295 |
+
}
|
| 296 |
+
"""
|
| 297 |
+
|
| 298 |
controlnet_model_dict = {
|
| 299 |
"sdxl-light-caption-30000": "sdxl_light_caption_output/checkpoint-30000/controlnet",
|
| 300 |
"sdxl-light-custom-caption-30000": "sdxl_light_custom_caption_output/checkpoint-30000/controlnet",
|
|
|
|
| 326 |
],
|
| 327 |
examples=images,
|
| 328 |
additional_inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
gr.Slider(0, 1000, 123, label="Seed"),
|
| 330 |
gr.Radio(choices=[1, 2, 4, 8],
|
| 331 |
value=8,
|
|
|
|
| 365 |
],
|
| 366 |
title="ColorRevive",
|
| 367 |
description="Restore a black-and-white photo to color",
|
| 368 |
+
theme="Yntec/HaleyCH_Theme_Orange",
|
| 369 |
+
css=css,
|
| 370 |
cache_examples=False
|
| 371 |
)
|
| 372 |
return interface
|
| 373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
|
| 375 |
def main():
|
| 376 |
# launch()μμλ ν
λ§ μ€μ μ μ κ±°
|