Spaces:
Runtime error
Runtime error
James Zhou
commited on
Commit
·
d4bbdf2
1
Parent(s):
9e52f8b
[update] app
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import os
|
2 |
import tempfile
|
3 |
import gradio as gr
|
@@ -114,6 +115,8 @@ def auto_load_models() -> str:
|
|
114 |
logger.error(f"模型加载失败: {str(e)}")
|
115 |
return f"❌ 模型加载失败: {str(e)}"
|
116 |
|
|
|
|
|
117 |
def infer_single_video(
|
118 |
video_file,
|
119 |
text_prompt: str,
|
|
|
1 |
+
import spaces
|
2 |
import os
|
3 |
import tempfile
|
4 |
import gradio as gr
|
|
|
115 |
logger.error(f"模型加载失败: {str(e)}")
|
116 |
return f"❌ 模型加载失败: {str(e)}"
|
117 |
|
118 |
+
@spaces.GPU(duration=120)
|
119 |
+
@torch.inference_mode()
|
120 |
def infer_single_video(
|
121 |
video_file,
|
122 |
text_prompt: str,
|