Spaces:
Running
Running
Update generate.py
Browse files- generate.py +7 -0
generate.py
CHANGED
@@ -22,6 +22,13 @@ command = f"python run_model.py --task {args.task} --size {args.size} --frame_nu
|
|
22 |
|
23 |
subprocess.run(command, shell=True)
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
# Save output
|
26 |
if os.path.exists("output.mp4"):
|
27 |
print("✅ Video generated successfully: output.mp4")
|
|
|
22 |
|
23 |
subprocess.run(command, shell=True)
|
24 |
|
25 |
+
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
26 |
+
stdout, stderr = process.communicate()
|
27 |
+
|
28 |
+
print("Output:", stdout.decode())
|
29 |
+
print("Error:", stderr.decode())
|
30 |
+
|
31 |
+
|
32 |
# Save output
|
33 |
if os.path.exists("output.mp4"):
|
34 |
print("✅ Video generated successfully: output.mp4")
|