Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,8 @@ from tqdm import tqdm
|
|
39 |
from models.multimodal_encoder.builder import build_image_tower, build_video_tower
|
40 |
from models.multimodal_projector.builder import build_vision_projector
|
41 |
|
|
|
|
|
42 |
|
43 |
title_markdown = ("""<div class="embed_hidden" style="text-align: center;">
|
44 |
<h1>MotionLLM: Understanding Human Behaviors from Human Motions and Videos</h1>
|
@@ -295,7 +297,7 @@ def get_processor(X, config, device, pretrained_checkpoint_tower, model_path = '
|
|
295 |
|
296 |
return mm_backbone_mlp_model, processor
|
297 |
|
298 |
-
|
299 |
def motionllm(
|
300 |
args,
|
301 |
input_video_path: str,
|
@@ -361,7 +363,7 @@ def save_video_to_local(video_path):
|
|
361 |
shutil.copyfile(video_path, filename)
|
362 |
return filename
|
363 |
|
364 |
-
|
365 |
def generate(image1, video, textbox_in, first_run, state, images_tensor):
|
366 |
flag = 1
|
367 |
|
|
|
39 |
from models.multimodal_encoder.builder import build_image_tower, build_video_tower
|
40 |
from models.multimodal_projector.builder import build_vision_projector
|
41 |
|
42 |
+
import spaces
|
43 |
+
|
44 |
|
45 |
title_markdown = ("""<div class="embed_hidden" style="text-align: center;">
|
46 |
<h1>MotionLLM: Understanding Human Behaviors from Human Motions and Videos</h1>
|
|
|
297 |
|
298 |
return mm_backbone_mlp_model, processor
|
299 |
|
300 |
+
@spaces.GPU
|
301 |
def motionllm(
|
302 |
args,
|
303 |
input_video_path: str,
|
|
|
363 |
shutil.copyfile(video_path, filename)
|
364 |
return filename
|
365 |
|
366 |
+
@spaces.GPU
|
367 |
def generate(image1, video, textbox_in, first_run, state, images_tensor):
|
368 |
flag = 1
|
369 |
|