Update README.md
Browse files
README.md
CHANGED
@@ -5,4 +5,24 @@ license: mit
|
|
5 |
pipeline_tag: video-text-to-text
|
6 |
---
|
7 |
|
8 |
-
# VideoChat2-TPO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
pipeline_tag: video-text-to-text
|
6 |
---
|
7 |
|
8 |
+
# VideoChat2-TPO
|
9 |
+
|
10 |
+
## 🏃 Installation
|
11 |
+
|
12 |
+
```
|
13 |
+
pip install -r requirements.txt
|
14 |
+
python app.py
|
15 |
+
```
|
16 |
+
|
17 |
+
## 🔧 Usage
|
18 |
+
|
19 |
+
```
|
20 |
+
from transformers import AutoModel, AutoTokenizer
|
21 |
+
from tokenizer import MultimodalLlamaTokenizer
|
22 |
+
|
23 |
+
model_path = "OpenGVLab/VideoChat-TPO"
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path,
|
25 |
+
trust_remote_code=True,
|
26 |
+
use_fast=False,)
|
27 |
+
model = AutoModel.from_pretrained(model_path, trust_remote_code=True, _tokenizer=self.tokenizer).eval()
|
28 |
+
```
|