Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -47,6 +47,7 @@ os.makedirs('output', exist_ok=True)
|
|
47 |
|
48 |
# def inference(img, version, scale, weight):
|
49 |
def inference(img, version, scale, blur_face):
|
|
|
50 |
blur_face = int(blur_face)
|
51 |
if blur_face % 2 != 1:
|
52 |
blur_face += 1
|
@@ -152,8 +153,8 @@ with gr.Blocks() as demo:
|
|
152 |
with gr.Column():
|
153 |
file_path = gr.components.Image(type="filepath", label="Input")
|
154 |
version = gr.components.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", value='v1.4', label='version')
|
155 |
-
rescaling_factor = gr.components.
|
156 |
-
blur_face = gr.
|
157 |
submit = gr.Button("Submit")
|
158 |
with gr.Column():
|
159 |
output_img = gr.components.Image(type="numpy", label="Output (The whole image)")
|
|
|
47 |
|
48 |
# def inference(img, version, scale, weight):
|
49 |
def inference(img, version, scale, blur_face):
|
50 |
+
scale = int(scale)
|
51 |
blur_face = int(blur_face)
|
52 |
if blur_face % 2 != 1:
|
53 |
blur_face += 1
|
|
|
153 |
with gr.Column():
|
154 |
file_path = gr.components.Image(type="filepath", label="Input")
|
155 |
version = gr.components.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", value='v1.4', label='version')
|
156 |
+
rescaling_factor = gr.components.Radio(['1', '2', '4'], type="value", value='2', label='Rescaling factor')
|
157 |
+
blur_face = gr.Slider(label='Blur face', minimum=0, maximum=55, value=0, step=1)
|
158 |
submit = gr.Button("Submit")
|
159 |
with gr.Column():
|
160 |
output_img = gr.components.Image(type="numpy", label="Output (The whole image)")
|