Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,6 +43,8 @@ if pipeline_available:
|
|
| 43 |
|
| 44 |
# Generate video
|
| 45 |
with st.spinner("Generating video... This may take a while."):
|
|
|
|
|
|
|
| 46 |
video_frames = pipe(
|
| 47 |
prompt=prompt,
|
| 48 |
image=image,
|
|
@@ -52,3 +54,7 @@ if pipeline_available:
|
|
| 52 |
guidance_scale=6,
|
| 53 |
generator=torch.Generator(device=device).manual_seed(42),
|
| 54 |
).frames[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# Generate video
|
| 45 |
with st.spinner("Generating video... This may take a while."):
|
| 46 |
+
try:
|
| 47 |
+
# Attempt to generate the video
|
| 48 |
video_frames = pipe(
|
| 49 |
prompt=prompt,
|
| 50 |
image=image,
|
|
|
|
| 54 |
guidance_scale=6,
|
| 55 |
generator=torch.Generator(device=device).manual_seed(42),
|
| 56 |
).frames[0]
|
| 57 |
+
except Exception as e:
|
| 58 |
+
# Handle errors gracefully
|
| 59 |
+
st.error(f"An error occurred during video generation: {e}")
|
| 60 |
+
|