Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
-
from
|
|
|
3 |
|
4 |
-
# Load
|
5 |
-
video_model = pipeline(
|
6 |
|
7 |
def generate_video(prompt):
|
8 |
-
|
9 |
-
return
|
10 |
|
11 |
# Gradio UI
|
12 |
iface = gr.Interface(
|
|
|
1 |
import gradio as gr
|
2 |
+
from modelscope.pipelines import pipeline
|
3 |
+
from modelscope.utils.constant import Tasks
|
4 |
|
5 |
+
# Load ModelScope's Text-to-Video Model
|
6 |
+
video_model = pipeline(Tasks.text_to_video_synthesis, model='damo/text-to-video-synthesis')
|
7 |
|
8 |
def generate_video(prompt):
|
9 |
+
result = video_model({'text': prompt})
|
10 |
+
return result["output_video"]
|
11 |
|
12 |
# Gradio UI
|
13 |
iface = gr.Interface(
|