ariG23498 HF Staff commited on
Commit
2787b74
·
verified ·
1 Parent(s): e0c33d6

Upload LiquidAI_LFM2-VL-3B_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. LiquidAI_LFM2-VL-3B_0.py +2 -28
LiquidAI_LFM2-VL-3B_0.py CHANGED
@@ -11,20 +11,7 @@
11
  # ///
12
 
13
  try:
14
- # Use a pipeline as a high-level helper
15
- from transformers import pipeline
16
-
17
- pipe = pipeline("image-text-to-text", model="LiquidAI/LFM2-VL-3B")
18
- messages = [
19
- {
20
- "role": "user",
21
- "content": [
22
- {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
23
- {"type": "text", "text": "What animal is on the candy?"}
24
- ]
25
- },
26
- ]
27
- pipe(text=messages)
28
  with open('LiquidAI_LFM2-VL-3B_0.txt', 'w', encoding='utf-8') as f:
29
  f.write('Everything was good in LiquidAI_LFM2-VL-3B_0.txt')
30
  except Exception as e:
@@ -39,20 +26,7 @@ except Exception as e:
39
  with open('LiquidAI_LFM2-VL-3B_0.txt', 'a', encoding='utf-8') as f:
40
  import traceback
41
  f.write('''```CODE:
42
- # Use a pipeline as a high-level helper
43
- from transformers import pipeline
44
-
45
- pipe = pipeline("image-text-to-text", model="LiquidAI/LFM2-VL-3B")
46
- messages = [
47
- {
48
- "role": "user",
49
- "content": [
50
- {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
51
- {"type": "text", "text": "What animal is on the candy?"}
52
- ]
53
- },
54
- ]
55
- pipe(text=messages)
56
  ```
57
 
58
  ERROR:
 
11
  # ///
12
 
13
  try:
14
+ !pip install -U transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  with open('LiquidAI_LFM2-VL-3B_0.txt', 'w', encoding='utf-8') as f:
16
  f.write('Everything was good in LiquidAI_LFM2-VL-3B_0.txt')
17
  except Exception as e:
 
26
  with open('LiquidAI_LFM2-VL-3B_0.txt', 'a', encoding='utf-8') as f:
27
  import traceback
28
  f.write('''```CODE:
29
+ !pip install -U transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ```
31
 
32
  ERROR: