vilarin commited on
Commit
a92a2f9
·
verified ·
1 Parent(s): 1c35dc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -104,6 +104,7 @@ def change_media(image_in, video_in, selected):
104
  @spaces.GPU(duration=120)
105
  def generate(
106
  media,
 
107
  selected,
108
  seed: Optional[int] = -1,
109
  num_inference_steps: int = 5,
@@ -112,7 +113,6 @@ def generate(
112
  motion_bucket_id: int = 127,
113
  fps_id: int = 25,
114
  num_frames: int = 50,
115
- prompt: str = "best quality",
116
  output_folder: str = "outputs",
117
  progress=gr.Progress(track_tqdm=True)):
118
 
@@ -170,12 +170,12 @@ def generate(
170
 
171
 
172
  examples = [
173
- ['./walking.mp4', "A woman walking on the street", 0],
174
- ['./smilegirl.mp4', "A girl stand on the grass", 0],
175
- ['./working.mp4', "A woman is doing the dishes", 0],
176
- ["./train.jpg", "", 1],
177
- ["./girl.webp", "", 1],
178
- ["./robo.jpg", "", 1],
179
  ]
180
 
181
 
@@ -266,7 +266,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
266
  examples_per_page=4,
267
  )
268
  selected.change(change_media, inputs=[image_in, video_in, selected], outputs=[image_in, video_in, media, prompt])
269
- submit_event = submit_btn.click(fn=generate, inputs=[media, selected, seed, num_inference_steps, animatediff_batch_size, animatediff_stride, motion_bucket_id, fps_id, num_frames, prompt], outputs=[video, seed], api_name="video")
270
  #stop_btn.click(fn=None, inputs=None, outputs=None, cancels=[submit_event])
271
 
272
  demo.queue().launch()
 
104
  @spaces.GPU(duration=120)
105
  def generate(
106
  media,
107
+ prompt: str = "best quality",
108
  selected,
109
  seed: Optional[int] = -1,
110
  num_inference_steps: int = 5,
 
113
  motion_bucket_id: int = 127,
114
  fps_id: int = 25,
115
  num_frames: int = 50,
 
116
  output_folder: str = "outputs",
117
  progress=gr.Progress(track_tqdm=True)):
118
 
 
170
 
171
 
172
  examples = [
173
+ ['./walking.mp4', "A woman walking on the street", "Diffutoon"],
174
+ ['./smilegirl.mp4', "A girl stand on the grass", "Diffutoon"],
175
+ ['./working.mp4', "A woman is doing the dishes", "Diffutoon"],
176
+ ["./train.jpg", "", "ExVideo"],
177
+ ["./girl.webp", "", "ExVideo"],
178
+ ["./robo.jpg", "", "ExVideo"],
179
  ]
180
 
181
 
 
266
  examples_per_page=4,
267
  )
268
  selected.change(change_media, inputs=[image_in, video_in, selected], outputs=[image_in, video_in, media, prompt])
269
+ submit_event = submit_btn.click(fn=generate, inputs=[media, prompt, selected, seed, num_inference_steps, animatediff_batch_size, animatediff_stride, motion_bucket_id, fps_id, num_frames], outputs=[video, seed], api_name="video")
270
  #stop_btn.click(fn=None, inputs=None, outputs=None, cancels=[submit_event])
271
 
272
  demo.queue().launch()