μ†‘ν˜•κ·œ commited on
Commit
85302a7
β€’
1 Parent(s): 40e54ff

hotfix | upgrade gradio version and fix code (`267056d` in https://bitbucket.org/maum-system/cvpr22-demo-gradio)

Browse files
Files changed (2) hide show
  1. README.md +1 -0
  2. app.py +34 -34
README.md CHANGED
@@ -4,6 +4,7 @@ emoji: πŸ‘„
4
  colorFrom: blue
5
  colorTo: blue
6
  sdk: gradio
 
7
  app_file: app.py
8
  pinned: false
9
  license: cc-by-nc-sa-4.0
 
4
  colorFrom: blue
5
  colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 3.0.6
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-sa-4.0
app.py CHANGED
@@ -148,38 +148,38 @@ class GradioApplication:
148
 
149
 
150
  def prepare_input():
151
- text_input = gr.inputs.Textbox(lines=2,
152
- placeholder="Type your text with English, Chinese, Korean, and Japanese.",
153
- default="Hello, this is demonstration for talking face generation "
154
- "with multilingual text-to-speech.",
155
- label="Text")
156
- lang_input = gr.inputs.Radio(['Korean', 'English', 'Japanese', 'Chinese'],
157
- type='value',
158
- default=None,
159
- label="Language")
160
- duration_rate_input = gr.inputs.Slider(minimum=0.8,
161
- maximum=1.2,
162
- step=0.01,
163
- default=1.0,
164
- label="Duration (The bigger the value, the slower it pronounces)")
165
- start_padding_input = gr.inputs.Slider(minimum=0.0,
166
- maximum=2.0,
167
- step=0.1,
168
- default=0.0,
169
- label="Start padding (s)")
170
- end_padding_input = gr.inputs.Slider(minimum=0.0,
171
- maximum=2.0,
172
- step=0.1,
173
- default=0.0,
174
- label="End padding (s)")
175
- action_input = gr.inputs.Radio(['Default', 'Hand', 'BothHand', 'HandDown', 'Sorry'],
176
- type='value',
177
- default='Default',
178
- label="Select an action...")
179
- background_input = gr.inputs.Radio(['None', 'CVPR', 'Black', 'River', 'Sky'],
180
- type='index',
181
- default='None',
182
- label="Background image")
183
 
184
  return [text_input, lang_input,
185
  duration_rate_input, start_padding_input, end_padding_input,
@@ -187,10 +187,10 @@ def prepare_input():
187
 
188
 
189
  def prepare_output():
190
- translation_result_otuput = gr.outputs.Textbox(type="str",
191
  label="Translation Result")
192
 
193
- video_output = gr.outputs.Video(format='mp4')
194
  return [translation_result_otuput, video_output]
195
 
196
 
 
148
 
149
 
150
  def prepare_input():
151
+ text_input = gr.Textbox(lines=2,
152
+ placeholder="Type your text with English, Chinese, Korean, and Japanese.",
153
+ value="Hello, this is demonstration for talking face generation "
154
+ "with multilingual text-to-speech.",
155
+ label="Text")
156
+ lang_input = gr.Radio(['Korean', 'English', 'Japanese', 'Chinese'],
157
+ type='value',
158
+ value=None,
159
+ label="Language")
160
+ duration_rate_input = gr.Slider(minimum=0.8,
161
+ maximum=1.2,
162
+ step=0.01,
163
+ value=1.0,
164
+ label="Duration (The bigger the value, the slower it pronounces)")
165
+ start_padding_input = gr.Slider(minimum=0.0,
166
+ maximum=2.0,
167
+ step=0.1,
168
+ value=0.0,
169
+ label="Start padding (s)")
170
+ end_padding_input = gr.Slider(minimum=0.0,
171
+ maximum=2.0,
172
+ step=0.1,
173
+ value=0.0,
174
+ label="End padding (s)")
175
+ action_input = gr.Radio(['Default', 'Hand', 'BothHand', 'HandDown', 'Sorry'],
176
+ type='value',
177
+ value='Default',
178
+ label="Select an action ...")
179
+ background_input = gr.Radio(['None', 'CVPR', 'Black', 'River', 'Sky'],
180
+ type='index',
181
+ value='None',
182
+ label="Select a background image/video ...")
183
 
184
  return [text_input, lang_input,
185
  duration_rate_input, start_padding_input, end_padding_input,
 
187
 
188
 
189
  def prepare_output():
190
+ translation_result_otuput = gr.Textbox(type="str",
191
  label="Translation Result")
192
 
193
+ video_output = gr.Video(format='mp4')
194
  return [translation_result_otuput, video_output]
195
 
196