Upload allenai_olmOCR-2-7B-1025-FP8_0.py with huggingface_hub
Browse files
allenai_olmOCR-2-7B-1025-FP8_0.py
CHANGED
|
@@ -11,10 +11,7 @@
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
-
|
| 15 |
-
from transformers import pipeline
|
| 16 |
-
|
| 17 |
-
pipe = pipeline("image-to-text", model="allenai/olmOCR-2-7B-1025-FP8")
|
| 18 |
with open('allenai_olmOCR-2-7B-1025-FP8_0.txt', 'w', encoding='utf-8') as f:
|
| 19 |
f.write('Everything was good in allenai_olmOCR-2-7B-1025-FP8_0.txt')
|
| 20 |
except Exception as e:
|
|
@@ -29,10 +26,7 @@ except Exception as e:
|
|
| 29 |
with open('allenai_olmOCR-2-7B-1025-FP8_0.txt', 'a', encoding='utf-8') as f:
|
| 30 |
import traceback
|
| 31 |
f.write('''```CODE:
|
| 32 |
-
|
| 33 |
-
from transformers import pipeline
|
| 34 |
-
|
| 35 |
-
pipe = pipeline("image-to-text", model="allenai/olmOCR-2-7B-1025-FP8")
|
| 36 |
```
|
| 37 |
|
| 38 |
ERROR:
|
|
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
+
!pip install -U transformers
|
|
|
|
|
|
|
|
|
|
| 15 |
with open('allenai_olmOCR-2-7B-1025-FP8_0.txt', 'w', encoding='utf-8') as f:
|
| 16 |
f.write('Everything was good in allenai_olmOCR-2-7B-1025-FP8_0.txt')
|
| 17 |
except Exception as e:
|
|
|
|
| 26 |
with open('allenai_olmOCR-2-7B-1025-FP8_0.txt', 'a', encoding='utf-8') as f:
|
| 27 |
import traceback
|
| 28 |
f.write('''```CODE:
|
| 29 |
+
!pip install -U transformers
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
| 32 |
ERROR:
|