Spaces:
Running
on
Zero
Running
on
Zero
fix error
Browse files
app.py
CHANGED
@@ -32,12 +32,18 @@ def generate_video(prompt):
|
|
32 |
print("Starting video generation...")
|
33 |
start_time = time.time()
|
34 |
|
35 |
-
# Generate video
|
36 |
output = pipe(prompt)
|
37 |
|
38 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
output_path = "generated_video.mp4"
|
40 |
-
|
41 |
|
42 |
end_time = time.time()
|
43 |
print(f"Video saved to {output_path} in {end_time - start_time:.2f} seconds")
|
|
|
32 |
print("Starting video generation...")
|
33 |
start_time = time.time()
|
34 |
|
35 |
+
# Generate video output
|
36 |
output = pipe(prompt)
|
37 |
|
38 |
+
# Debug: Print the output object to check its attributes
|
39 |
+
print("Output:", output)
|
40 |
+
|
41 |
+
# Assuming the output is a video tensor
|
42 |
+
video_tensor = output['video'] # Adjust according to the correct output keys
|
43 |
+
|
44 |
+
# Save the generated video file
|
45 |
output_path = "generated_video.mp4"
|
46 |
+
video_tensor.save(output_path) # Replace with correct save method if necessary
|
47 |
|
48 |
end_time = time.time()
|
49 |
print(f"Video saved to {output_path} in {end_time - start_time:.2f} seconds")
|