Update README.md
Browse files
README.md
CHANGED
|
@@ -75,6 +75,9 @@ We deploy MiniCPM-V 4.5 on iPad M4 with [iOS demo](https://github.com/tc-mb/Mini
|
|
| 75 |
|
| 76 |
## Usage
|
| 77 |
|
|
|
|
|
|
|
|
|
|
| 78 |
```python
|
| 79 |
import torch
|
| 80 |
from PIL import Image
|
|
@@ -89,7 +92,7 @@ tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-4_5', trust_remote_
|
|
| 89 |
|
| 90 |
image = Image.open('./assets/minicpmo2_6/show_demo.jpg').convert('RGB')
|
| 91 |
|
| 92 |
-
enable_thinking=False # If `enable_thinking=True`, the
|
| 93 |
|
| 94 |
# First round chat
|
| 95 |
question = "What is the landform in the picture?"
|
|
@@ -134,7 +137,6 @@ By following these guidelines, you'll have a safe and enjoyable trip while appre
|
|
| 134 |
|
| 135 |
|
| 136 |
#### Chat with Video
|
| 137 |
-
<summary> Click to view Python code running MiniCPM-V-4_5 by with video input and 3D-Resampler. </summary>
|
| 138 |
|
| 139 |
```python
|
| 140 |
## The 3d-resampler compresses multiple frames into 64 tokens by introducing temporal_ids.
|
|
|
|
| 75 |
|
| 76 |
## Usage
|
| 77 |
|
| 78 |
+
If you wish to enable thinking mode, provide the argument `enable_thinking=True` to the chat function.
|
| 79 |
+
|
| 80 |
+
#### Chat with Image
|
| 81 |
```python
|
| 82 |
import torch
|
| 83 |
from PIL import Image
|
|
|
|
| 92 |
|
| 93 |
image = Image.open('./assets/minicpmo2_6/show_demo.jpg').convert('RGB')
|
| 94 |
|
| 95 |
+
enable_thinking=False # If `enable_thinking=True`, the thinking mode is enabled.
|
| 96 |
|
| 97 |
# First round chat
|
| 98 |
question = "What is the landform in the picture?"
|
|
|
|
| 137 |
|
| 138 |
|
| 139 |
#### Chat with Video
|
|
|
|
| 140 |
|
| 141 |
```python
|
| 142 |
## The 3d-resampler compresses multiple frames into 64 tokens by introducing temporal_ids.
|