Spaces:
Sleeping
Sleeping
LittleLirow
commited on
Commit
•
7f53786
1
Parent(s):
1d70448
Update video save path
Browse files- animation.py +3 -1
animation.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import os
|
2 |
import replicate
|
|
|
3 |
|
4 |
def story2video(story_text, story_frames, auth_replicate):
|
5 |
os.environ["REPLICATE_API_TOKEN"] = auth_replicate
|
@@ -9,6 +10,7 @@ def story2video(story_text, story_frames, auth_replicate):
|
|
9 |
input={"max_frames": story_frames,
|
10 |
"model_checkpoint": "Protogen_V2.2.ckpt","animation_prompts": story_text,
|
11 |
"fps": 10
|
12 |
-
|
13 |
)
|
|
|
14 |
return output
|
|
|
1 |
import os
|
2 |
import replicate
|
3 |
+
from urllib.request import urlretrieve
|
4 |
|
5 |
def story2video(story_text, story_frames, auth_replicate):
|
6 |
os.environ["REPLICATE_API_TOKEN"] = auth_replicate
|
|
|
10 |
input={"max_frames": story_frames,
|
11 |
"model_checkpoint": "Protogen_V2.2.ckpt","animation_prompts": story_text,
|
12 |
"fps": 10
|
13 |
+
}
|
14 |
)
|
15 |
+
urlretrieve(output, 'video_out.mp4')
|
16 |
return output
|