Commit deca0dff authored by chenpangpang's avatar chenpangpang
Browse files

feat: 修改gradio页面为中文

parent 674b6804
...@@ -199,24 +199,19 @@ def gradio_process_image(input_image, resolution, num_inference_steps, strength, ...@@ -199,24 +199,19 @@ def gradio_process_image(input_image, resolution, num_inference_steps, strength,
return result return result
title = """<h1 align="center">Image Upscaler with Tile Controlnet</h1> title = """<h1 align="center">tile-upscaler:由低质量图片生成高质量图片的图片修复工具</h1>
<p align="center">The main ideas come from</p>
<p><center>
<a href="https://github.com/philz1337x/clarity-upscaler" target="_blank">[philz1337x]</a>
<a href="https://github.com/BatouResearch/controlnet-tile-upscale" target="_blank">[Pau-Lozano]</a>
</center></p>
""" """
with gr.Blocks(css="./theme.css") as demo: with gr.Blocks(css="./theme.css") as demo:
gr.HTML(title) gr.HTML(title)
with gr.Row(): with gr.Row():
with gr.Column(): with gr.Column():
input_image = gr.Image(type="pil", label="Input Image") input_image = gr.Image(type="pil", label="输入图片")
run_button = gr.Button("Enhance Image") run_button = gr.Button("生成")
with gr.Column(): with gr.Column():
gallery = gr.Image(label="Generated Images") gallery = gr.Image(label="生成图片")
with gr.Accordion("Advanced Options", open=False): with gr.Accordion("高级选项", open=False):
resolution = gr.Slider(minimum=256, maximum=2048, value=512, step=256, label="Resolution") resolution = gr.Slider(minimum=256, maximum=2048, value=512, step=256, label="分辨率")
num_inference_steps = gr.Slider(minimum=1, maximum=50, value=20, step=1, label="Number of Inference Steps") num_inference_steps = gr.Slider(minimum=1, maximum=50, value=20, step=1, label="Number of Inference Steps")
strength = gr.Slider(minimum=0, maximum=1, value=0.4, step=0.01, label="Strength") strength = gr.Slider(minimum=0, maximum=1, value=0.4, step=0.01, label="Strength")
hdr = gr.Slider(minimum=0, maximum=1, value=0, step=0.1, label="HDR Effect") hdr = gr.Slider(minimum=0, maximum=1, value=0, step=0.1, label="HDR Effect")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment