Spaces:
Runtime error
Runtime error
Commit
•
52d3ff3
1
Parent(s):
d352d51
update
Browse files- app.py +3 -1
- requirements.txt +5 -5
app.py
CHANGED
@@ -11,6 +11,7 @@ from videollama2.constants import MMODAL_TOKEN_INDEX, DEFAULT_MMODAL_TOKEN
|
|
11 |
from videollama2.conversation import conv_templates, SeparatorStyle, Conversation
|
12 |
from videollama2.model.builder import load_pretrained_model
|
13 |
from videollama2.mm_utils import KeywordsStoppingCriteria, tokenizer_MMODAL_token, get_model_name_from_path, process_image, process_video
|
|
|
14 |
|
15 |
|
16 |
title_markdown = ("""
|
@@ -224,7 +225,8 @@ def clear_history(state, state_):
|
|
224 |
conv_mode = "llama_2"
|
225 |
model_path = 'DAMO-NLP-SG/VideoLLaMA2-7B'
|
226 |
|
227 |
-
device =
|
|
|
228 |
|
229 |
handler = Chat(model_path, conv_mode=conv_mode, load_8bit=False, load_4bit=True)
|
230 |
|
|
|
11 |
from videollama2.conversation import conv_templates, SeparatorStyle, Conversation
|
12 |
from videollama2.model.builder import load_pretrained_model
|
13 |
from videollama2.mm_utils import KeywordsStoppingCriteria, tokenizer_MMODAL_token, get_model_name_from_path, process_image, process_video
|
14 |
+
import devicetorch
|
15 |
|
16 |
|
17 |
title_markdown = ("""
|
|
|
225 |
conv_mode = "llama_2"
|
226 |
model_path = 'DAMO-NLP-SG/VideoLLaMA2-7B'
|
227 |
|
228 |
+
device = devicetorch.get(torch)
|
229 |
+
#device = torch.device("cuda")
|
230 |
|
231 |
handler = Chat(model_path, conv_mode=conv_mode, load_8bit=False, load_4bit=True)
|
232 |
|
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
# basic dependencies
|
3 |
-
torchvision==0.15.2
|
4 |
-
torch==2.0.1
|
5 |
transformers==4.37.2
|
6 |
tokenizers==0.15.1
|
7 |
deepspeed==0.13.1
|
@@ -11,7 +11,7 @@ numpy
|
|
11 |
spaces
|
12 |
peft==0.4.0
|
13 |
# data processing
|
14 |
-
decord==0.6.0
|
15 |
imageio==2.34.0
|
16 |
imageio-ffmpeg==0.4.9
|
17 |
pytorchvideo==0.1.5
|
@@ -34,4 +34,4 @@ requests
|
|
34 |
httpx==0.24.0
|
35 |
uvicorn
|
36 |
fastapi
|
37 |
-
wandb
|
|
|
1 |
+
#--extra-index-url https://download.pytorch.org/whl/cu117
|
2 |
# basic dependencies
|
3 |
+
#torchvision==0.15.2
|
4 |
+
#torch==2.0.1
|
5 |
transformers==4.37.2
|
6 |
tokenizers==0.15.1
|
7 |
deepspeed==0.13.1
|
|
|
11 |
spaces
|
12 |
peft==0.4.0
|
13 |
# data processing
|
14 |
+
#decord==0.6.0
|
15 |
imageio==2.34.0
|
16 |
imageio-ffmpeg==0.4.9
|
17 |
pytorchvideo==0.1.5
|
|
|
34 |
httpx==0.24.0
|
35 |
uvicorn
|
36 |
fastapi
|
37 |
+
wandb
|