Spaces:
Running
Running
Update generate.py
Browse files- generate.py +3 -4
generate.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from modelscope.pipelines import pipeline
|
| 2 |
from modelscope.utils.constant import Tasks
|
| 3 |
import argparse
|
|
|
|
| 4 |
|
| 5 |
parser = argparse.ArgumentParser()
|
| 6 |
parser.add_argument("--prompt", required=True)
|
|
@@ -9,8 +10,6 @@ args = parser.parse_args()
|
|
| 9 |
|
| 10 |
pipe = pipeline(Tasks.text_to_video_synthesis, model='damo-vilab/modelscope-text-to-video-synthesis')
|
| 11 |
result = pipe(args.prompt)
|
| 12 |
-
video_path = result['output_video']
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
shutil.move(video_path, args.output)
|
|
|
|
| 1 |
from modelscope.pipelines import pipeline
|
| 2 |
from modelscope.utils.constant import Tasks
|
| 3 |
import argparse
|
| 4 |
+
import shutil
|
| 5 |
|
| 6 |
parser = argparse.ArgumentParser()
|
| 7 |
parser.add_argument("--prompt", required=True)
|
|
|
|
| 10 |
|
| 11 |
pipe = pipeline(Tasks.text_to_video_synthesis, model='damo-vilab/modelscope-text-to-video-synthesis')
|
| 12 |
result = pipe(args.prompt)
|
|
|
|
| 13 |
|
| 14 |
+
# Move video file to expected output name
|
| 15 |
+
shutil.move(result["output_video"], args.output)
|
|
|