Upload openbmb_MiniCPM-V-4_0.py with huggingface_hub
Browse files- openbmb_MiniCPM-V-4_0.py +1 -11
openbmb_MiniCPM-V-4_0.py
CHANGED
|
@@ -1,14 +1,8 @@
|
|
| 1 |
# /// script
|
| 2 |
# requires-python = ">=3.12"
|
| 3 |
# dependencies = [
|
| 4 |
-
# "numpy",
|
| 5 |
-
# "einops",
|
| 6 |
-
# "torch",
|
| 7 |
# "transformers",
|
| 8 |
-
# "
|
| 9 |
-
# "datasets",
|
| 10 |
-
# "accelerate",
|
| 11 |
-
# "timm",
|
| 12 |
# ]
|
| 13 |
# ///
|
| 14 |
|
|
@@ -27,10 +21,6 @@ try:
|
|
| 27 |
},
|
| 28 |
]
|
| 29 |
pipe(text=messages)
|
| 30 |
-
|
| 31 |
-
# Load model directly
|
| 32 |
-
from transformers import AutoModel
|
| 33 |
-
model = AutoModel.from_pretrained("openbmb/MiniCPM-V-4", trust_remote_code=True, torch_dtype="auto"),
|
| 34 |
with open('openbmb_MiniCPM-V-4_0.txt', 'w') as f:
|
| 35 |
f.write('Everything was good in openbmb_MiniCPM-V-4_0.txt')
|
| 36 |
except Exception as e:
|
|
|
|
| 1 |
# /// script
|
| 2 |
# requires-python = ">=3.12"
|
| 3 |
# dependencies = [
|
|
|
|
|
|
|
|
|
|
| 4 |
# "transformers",
|
| 5 |
+
# "torch",
|
|
|
|
|
|
|
|
|
|
| 6 |
# ]
|
| 7 |
# ///
|
| 8 |
|
|
|
|
| 21 |
},
|
| 22 |
]
|
| 23 |
pipe(text=messages)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
with open('openbmb_MiniCPM-V-4_0.txt', 'w') as f:
|
| 25 |
f.write('Everything was good in openbmb_MiniCPM-V-4_0.txt')
|
| 26 |
except Exception as e:
|