Spaces:
Runtime error
Runtime error
fix: minor update
Browse files
app.py
CHANGED
@@ -31,6 +31,10 @@ if not model_dir.exists():
|
|
31 |
repo_type='model',
|
32 |
local_dir=model_dir)
|
33 |
|
|
|
|
|
|
|
|
|
34 |
pipe = pipeline('text-to-video-synthesis', model_dir.as_posix())
|
35 |
|
36 |
|
@@ -80,4 +84,5 @@ with gr.Blocks(css='style.css') as demo:
|
|
80 |
prompt.submit(fn=generate, inputs=inputs, outputs=result)
|
81 |
run_button.click(fn=generate, inputs=inputs, outputs=result)
|
82 |
|
83 |
-
|
|
|
|
31 |
repo_type='model',
|
32 |
local_dir=model_dir)
|
33 |
|
34 |
+
DESCRIPTION = '# [ModelScope Text to Video Synthesis](https://modelscope.cn/models/damo/text-to-video-synthesis/summary)'
|
35 |
+
if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
|
36 |
+
DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
37 |
+
|
38 |
pipe = pipeline('text-to-video-synthesis', model_dir.as_posix())
|
39 |
|
40 |
|
|
|
84 |
prompt.submit(fn=generate, inputs=inputs, outputs=result)
|
85 |
run_button.click(fn=generate, inputs=inputs, outputs=result)
|
86 |
|
87 |
+
|
88 |
+
demo.queue(api_open=False, max_size=15).launch()
|