Upload CohereLabs_command-a-vision-07-2025_0.py with huggingface_hub
Browse files
CohereLabs_command-a-vision-07-2025_0.py
CHANGED
|
@@ -7,20 +7,8 @@
|
|
| 7 |
# ///
|
| 8 |
|
| 9 |
try:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
pipe = pipeline("image-text-to-text", model="CohereLabs/command-a-vision-07-2025")
|
| 14 |
-
messages = [
|
| 15 |
-
{
|
| 16 |
-
"role": "user",
|
| 17 |
-
"content": [
|
| 18 |
-
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
|
| 19 |
-
{"type": "text", "text": "What animal is on the candy?"}
|
| 20 |
-
]
|
| 21 |
-
},
|
| 22 |
-
]
|
| 23 |
-
pipe(text=messages)
|
| 24 |
with open('CohereLabs_command-a-vision-07-2025_0.txt', 'w') as f:
|
| 25 |
f.write('Everything was good in CohereLabs_command-a-vision-07-2025_0.txt')
|
| 26 |
except Exception as e:
|
|
|
|
| 7 |
# ///
|
| 8 |
|
| 9 |
try:
|
| 10 |
+
from huggingface_hub import login
|
| 11 |
+
login(new_session=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
with open('CohereLabs_command-a-vision-07-2025_0.txt', 'w') as f:
|
| 13 |
f.write('Everything was good in CohereLabs_command-a-vision-07-2025_0.txt')
|
| 14 |
except Exception as e:
|