MohanaPrasad2002 commited on
Commit
d922b7e
·
verified ·
1 Parent(s): aa95885

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -40,7 +40,17 @@ def video_generation(
40
  generator=torch.Generator().manual_seed(42) # Optional seed
41
  ).frames[0]
42
 
43
- print(video_frames)
 
 
 
 
 
 
 
 
 
 
44
 
45
 
46
  @tool
 
40
  generator=torch.Generator().manual_seed(42) # Optional seed
41
  ).frames[0]
42
 
43
+ output_path = "generated_video.mp4"
44
+ video_frames[0].save(
45
+ output_path,
46
+ save_all=True,
47
+ append_images=video_frames[1:],
48
+ duration=1000, # milliseconds per frame
49
+ loop=0
50
+ )
51
+
52
+ return f"Video saved to {output_path}"
53
+
54
 
55
 
56
  @tool