2ch commited on
Commit
22cc7fd
·
verified ·
1 Parent(s): 7fe4df4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -673,16 +673,6 @@ def check_upscale_result(image: str) -> list[str]:
673
 
674
 
675
  with gr.Blocks(analytics_enabled=False, css=radio_css, theme='Taithrah/Minimal', title='апскейл') as demo:
676
- with gr.Tab(label="апскейл", elem_id="upscale_tab"):
677
- file_output = gr.Gallery(label="", container=True, object_fit="cover", columns=4, rows=4, allow_preview=True, preview=True, show_share_button=False, show_download_button=False, elem_id="upscaled_images")
678
- upload_button = gr.UploadButton("выбор одного изображения для обработки", file_types=["image"], file_count="single", variant="primary")
679
- upload_button.upload(fn=check_upscale_result, inputs=[upload_button], outputs=file_output, api_name="upscale")
680
- with gr.Tab(label="восстановление лиц", id=1, elem_id="restore_tab"):
681
- restore_method = gr.Radio(["codeformer", "gfpgan", "оба"], value="codeformer", label="", interactive=True)
682
- restore_method.change(fn=lambda x: print(f"restore_method value = {x}"), inputs=restore_method, api_name="show_selected_method")
683
- file_output = gr.Gallery(label="", container=True, object_fit="cover", columns=4, rows=4, allow_preview=True, preview=True, show_share_button=False, show_download_button=False, elem_id="restored_images")
684
- upload_button = gr.UploadButton("выбор нескольких изображений для обработки", file_types=["image"], file_count="multiple", variant="primary")
685
- upload_button.upload(fn=restore_upscale, inputs=[upload_button, restore_method], outputs=file_output, api_name="face_restore")
686
  with gr.Tab(label="наложение зернистости пленки и шума", id=2, elem_id="textures_tab"):
687
  with gr.Row(variant="compact", elem_id="textures_tab_images"):
688
  input_image = gr.Image(label="исходник", sources=["upload", "clipboard"], type="numpy")
 
673
 
674
 
675
  with gr.Blocks(analytics_enabled=False, css=radio_css, theme='Taithrah/Minimal', title='апскейл') as demo:
 
 
 
 
 
 
 
 
 
 
676
  with gr.Tab(label="наложение зернистости пленки и шума", id=2, elem_id="textures_tab"):
677
  with gr.Row(variant="compact", elem_id="textures_tab_images"):
678
  input_image = gr.Image(label="исходник", sources=["upload", "clipboard"], type="numpy")