Image-to-Text
Transformers
PyTorch
textract
feature-extraction
ocr
vision-language
qwen2-vl
custom-model
text-extraction
document-ai
high-accuracy
custom_code
Instructions to use BabaK07/textract-ai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BabaK07/textract-ai with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="BabaK07/textract-ai", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BabaK07/textract-ai", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
FIX: Add proper config.json with from_pretrained support
Browse files- config.json +11 -8
config.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
-
"model_type": "
|
| 6 |
"base_model": "Qwen/Qwen2-VL-2B-Instruct",
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"torch_dtype": "
|
| 10 |
-
"transformers_version": "4.
|
| 11 |
"auto_map": {
|
| 12 |
-
"AutoModel": "
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"FixedTextractAI"
|
| 4 |
],
|
| 5 |
+
"model_type": "textract",
|
| 6 |
"base_model": "Qwen/Qwen2-VL-2B-Instruct",
|
| 7 |
+
"hidden_size": 1536,
|
| 8 |
+
"vocab_size": 152064,
|
| 9 |
+
"torch_dtype": "float32",
|
| 10 |
+
"transformers_version": "4.40.0",
|
| 11 |
"auto_map": {
|
| 12 |
+
"AutoModel": "modeling_textract.FixedTextractAI",
|
| 13 |
+
"AutoConfig": "modeling_textract.TextractConfig"
|
| 14 |
+
},
|
| 15 |
+
"_name_or_path": "BabaK07/textract-ai",
|
| 16 |
+
"custom_model": true
|
| 17 |
}
|