Zhouyan248 commited on
Commit
9256323
β€’
1 Parent(s): 3886866

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -13
app.py CHANGED
@@ -8,7 +8,7 @@ from utils import mask_generation_before
8
  import os
9
  import cv2
10
 
11
- config_path = "/mnt/petrelfs/zhouyan/project/i2v/configs/sample_i2v.yaml"
12
  args = OmegaConf.load(config_path)
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
@@ -152,9 +152,9 @@ with gr.Blocks(css='style.css') as demo:
152
  inputs = [prompt,image_inp, seed_inp, ddim_steps]
153
  outputs = [video_out]
154
  ex = gr.Examples(
155
- examples = [["/mnt/petrelfs/zhouyan/project/i2v/The_picture_shows_the_beauty_of_the_sea_.jpg","A video of the beauty of the sea",123,50],
156
- ["/mnt/petrelfs/zhouyan/project/i2v/The_picture_shows_the_beauty_of_the_sea.png","A video of the beauty of the sea",123,50],
157
- ["/mnt/petrelfs/zhouyan/project/i2v/Close-up_essence_is_poured_from_bottleKodak_Vision.png","A video of close-up essence is poured from bottleKodak Vision",123,50]],
158
  fn = infer,
159
  inputs = [image_inp, prompt, seed_inp, ddim_steps],
160
  outputs=[video_out],
@@ -163,15 +163,7 @@ with gr.Blocks(css='style.css') as demo:
163
 
164
  )
165
  ex.dataset.headers = [""]
166
- # gr.Markdown("<center>some examples</center>")
167
- # with gr.Row():
168
- # gr.Image(value="/mnt/petrelfs/zhouyan/project/i2v/The_picture_shows_the_beauty_of_the_sea_.jpg")
169
- # gr.Image(value="/mnt/petrelfs/zhouyan/project/i2v/The_picture_shows_the_beauty_of_the_sea.png")
170
- # gr.Image(value="/mnt/petrelfs/zhouyan/project/i2v/Close-up_essence_is_poured_from_bottleKodak_Vision.png")
171
- # with gr.Row():
172
- # gr.Video(value="/mnt/petrelfs/zhouyan/project/i2v/The-picture-shows-the-beauty-of-the-sea-and-at-the-sam_slow-motion_0000_11301.mp4")
173
- # gr.Video(value="/mnt/petrelfs/zhouyan/project/i2v/The-picture-shows-the-beauty-of-the-sea-and-at-the-sam_slow-motion_0000_6600.mp4")
174
- # gr.Video(value="/mnt/petrelfs/zhouyan/project/i2v/Close-up-essence-is-poured-from-bottleKodak-Vision3-50_slow-motion_0000_001.mp4")
175
  # control_task.change(change_task_options, inputs=[control_task], outputs=[canny_opt, hough_opt, normal_opt], queue=False)
176
  clean_btn.click(clean, inputs=[], outputs=[video_out], queue=False)
177
  submit_btn.click(infer, inputs, outputs)
 
8
  import os
9
  import cv2
10
 
11
+ config_path = "./configs/sample_i2v.yaml"
12
  args = OmegaConf.load(config_path)
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
 
152
  inputs = [prompt,image_inp, seed_inp, ddim_steps]
153
  outputs = [video_out]
154
  ex = gr.Examples(
155
+ examples = [["./The_picture_shows_the_beauty_of_the_sea_.jpg","A video of the beauty of the sea",123,50],
156
+ ["./The_picture_shows_the_beauty_of_the_sea.png","A video of the beauty of the sea",123,50],
157
+ ["./Close-up_essence_is_poured_from_bottleKodak_Vision.png","A video of close-up essence is poured from bottleKodak Vision",123,50]],
158
  fn = infer,
159
  inputs = [image_inp, prompt, seed_inp, ddim_steps],
160
  outputs=[video_out],
 
163
 
164
  )
165
  ex.dataset.headers = [""]
166
+
 
 
 
 
 
 
 
 
167
  # control_task.change(change_task_options, inputs=[control_task], outputs=[canny_opt, hough_opt, normal_opt], queue=False)
168
  clean_btn.click(clean, inputs=[], outputs=[video_out], queue=False)
169
  submit_btn.click(infer, inputs, outputs)