Spaces:
Running
on
Zero
Running
on
Zero
Vision-CAIR
commited on
Commit
•
bc559f6
1
Parent(s):
a9d33f4
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ from longvu.mm_datautils import (
|
|
23 |
tokenizer_image_token,
|
24 |
)
|
25 |
from decord import cpu, VideoReader
|
26 |
-
|
27 |
|
28 |
title_markdown = """
|
29 |
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
@@ -67,8 +67,8 @@ class Chat:
|
|
67 |
def __init__(self):
|
68 |
self.version = "qwen"
|
69 |
model_name = "cambrian_qwen"
|
70 |
-
model_path = "
|
71 |
-
|
72 |
|
73 |
self.tokenizer, self.model, self.processor, _ = load_pretrained_model(model_path, None, model_name, device=device)
|
74 |
self.model.eval()
|
|
|
23 |
tokenizer_image_token,
|
24 |
)
|
25 |
from decord import cpu, VideoReader
|
26 |
+
from huggingface_hub import snapshot_download
|
27 |
|
28 |
title_markdown = """
|
29 |
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
|
|
67 |
def __init__(self):
|
68 |
self.version = "qwen"
|
69 |
model_name = "cambrian_qwen"
|
70 |
+
model_path = snapshot_download("Vision-CAIR/LongVU_Qwen2_7B", repo_type="model")
|
71 |
+
+ device = "cuda"
|
72 |
|
73 |
self.tokenizer, self.model, self.processor, _ = load_pretrained_model(model_path, None, model_name, device=device)
|
74 |
self.model.eval()
|