fffiloni commited on
Commit
eaf8a3c
1 Parent(s): aa6cde4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -20,10 +20,11 @@ def run_inference(prompt, video_path, condition, video_length):
20
  video_length = int(video_length)
21
  print(video_length)
22
  command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path 'outputs/' --video_length {video_length} --smoother_steps 19 20"
23
-
24
- output = f"outputs/{prompt}.mp4"
25
- return "done", output
26
 
 
 
 
27
 
28
 
29
 
@@ -46,6 +47,6 @@ with gr.Blocks() as demo:
46
  condition,
47
  video_length
48
  ],
49
- outputs=[stauts, video_res])
50
 
51
  demo.queue(max_size=12).launch()
 
20
  video_length = int(video_length)
21
  print(video_length)
22
  command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path 'outputs/' --video_length {video_length} --smoother_steps 19 20"
23
+ subprocess.run(command, shell=True)
 
 
24
 
25
+ # Construct the video path
26
+ video_path_output = f"'output'/{prompt}.mp4"
27
+ return "done", video_path_output
28
 
29
 
30
 
 
47
  condition,
48
  video_length
49
  ],
50
+ outputs=[status, video_res])
51
 
52
  demo.queue(max_size=12).launch()