Xintao hysts HF staff commited on
Commit
ed9b243
β€’
1 Parent(s): 3e972ea

Update to use gradio 3.25.0 (#47)

Browse files

- Update to gradio==3.25.0 (ace7b70d715118fae2a80c98a8b3be1c23693524)


Co-authored-by: hysts <hysts@users.noreply.huggingface.co>

Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +8 -8
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 😁
4
  colorFrom: yellow
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 3.1.7
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
4
  colorFrom: yellow
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 3.25.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py CHANGED
@@ -131,14 +131,14 @@ If you have any question, please email πŸ“§ `xintao.wang@outlook.com` or `xintao
131
  """
132
  demo = gr.Interface(
133
  inference, [
134
- gr.inputs.Image(type="filepath", label="Input"),
135
- # gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", default='v1.4', label='version'),
136
- gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", default='v1.4', label='version'),
137
- gr.inputs.Number(label="Rescaling factor", default=2),
138
- # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
139
  ], [
140
- gr.outputs.Image(type="numpy", label="Output (The whole image)"),
141
- gr.outputs.File(label="Download the output image")
142
  ],
143
  title=title,
144
  description=description,
@@ -147,4 +147,4 @@ demo = gr.Interface(
147
  # ['10045.png', 'v1.4', 2, 50]]).launch()
148
  examples=[['AI-generate.jpg', 'v1.4', 2], ['lincoln.jpg', 'v1.4', 2], ['Blake_Lively.jpg', 'v1.4', 2],
149
  ['10045.png', 'v1.4', 2]])
150
- demo.launch()
131
  """
132
  demo = gr.Interface(
133
  inference, [
134
+ gr.Image(type="filepath", label="Input"),
135
+ # gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", value='v1.4', label='version'),
136
+ gr.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'], type="value", value='v1.4', label='version'),
137
+ gr.Number(label="Rescaling factor", value=2),
138
+ # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', value=50)
139
  ], [
140
+ gr.Image(type="numpy", label="Output (The whole image)"),
141
+ gr.File(label="Download the output image")
142
  ],
143
  title=title,
144
  description=description,
147
  # ['10045.png', 'v1.4', 2, 50]]).launch()
148
  examples=[['AI-generate.jpg', 'v1.4', 2], ['lincoln.jpg', 'v1.4', 2], ['Blake_Lively.jpg', 'v1.4', 2],
149
  ['10045.png', 'v1.4', 2]])
150
+ demo.queue().launch()