wxDai commited on
Commit
cadd88e
·
1 Parent(s): c64dfa4
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -148,6 +148,7 @@ def generate_component(generate_function, text_, motion_len_, num_inference_step
148
  paths = paths + [None] * (MAX_VIDEOS - len(paths))
149
  return paths + [info]
150
 
 
151
  theme = gr.themes.Default(primary_hue="purple", secondary_hue="gray")
152
  generate_and_show = partial(generate_component, generate)
153
 
@@ -218,17 +219,19 @@ with gr.Blocks(theme=theme) as demo:
218
  gen_btn.click(
219
  fn=generate_and_show,
220
  inputs=[text, motion_len, num_inference_steps, cfg],
221
- outputs=videos+[results],
222
  )
223
  text.submit(
224
  fn=generate_and_show,
225
  inputs=[text, motion_len, num_inference_steps, cfg],
226
- outputs=videos+[results],
227
  )
228
 
 
229
  def clear_videos():
230
  return [None] * MAX_VIDEOS + [DEFAULT_TEXT] + [None]
231
 
 
232
  clear.click(fn=clear_videos, outputs=videos + [text] + [results])
233
 
234
  demo.launch()
 
148
  paths = paths + [None] * (MAX_VIDEOS - len(paths))
149
  return paths + [info]
150
 
151
+
152
  theme = gr.themes.Default(primary_hue="purple", secondary_hue="gray")
153
  generate_and_show = partial(generate_component, generate)
154
 
 
219
  gen_btn.click(
220
  fn=generate_and_show,
221
  inputs=[text, motion_len, num_inference_steps, cfg],
222
+ outputs=videos + [results],
223
  )
224
  text.submit(
225
  fn=generate_and_show,
226
  inputs=[text, motion_len, num_inference_steps, cfg],
227
+ outputs=videos + [results],
228
  )
229
 
230
+
231
  def clear_videos():
232
  return [None] * MAX_VIDEOS + [DEFAULT_TEXT] + [None]
233
 
234
+
235
  clear.click(fn=clear_videos, outputs=videos + [text] + [results])
236
 
237
  demo.launch()