vicalloy commited on
Commit
5236fda
1 Parent(s): 323d7cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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.Number(label="Rescaling factor", value=2)
156
- blur_face = gr.components.Number(label="Blur face", value=0)
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)")