Downloads ยท 30 days
10
2% of all-time downloads
BabaK07/textract-ai
textract-ai is a image-to-text model from BabaK07. Use it when you need a caption or text from an image. It is set up for transformers. The card lists the license as apache-2.0.
๐ FIXED: Hub loading now works properly!
Downloads ยท 30 days
10
2% of all-time downloads
All-time downloads
454
Public
Repo size
9 GB
Likes
1
Public
Click a slice to open those files.
.bin4.5 GB ยท 100%
From the Hugging Face model README
๐ FIXED: Hub loading now works properly!
A high-accuracy OCR model based on Qwen2-VL-2B-Instruct, now with proper Hugging Face Hub support.
AutoModel.from_pretrained() now works correctlyfrom transformers import AutoModel
from PIL import Image
# Load model from Hub (FIXED!)
model = AutoModel.from_pretrained("BabaK07/textract-ai", trust_remote_code=True)
# Load image
image = Image.open("your_image.jpg")
# Extract text
result = model.generate_ocr_text(image, use_native=True)
print(f"Text: {result['text']}")
print(f"Confidence: {result['confidence']:.1%}")
print(f"Success: {result['success']}")
AutoModel.from_pretrained()from transformers import AutoModel
from PIL import Image
model = AutoModel.from_pretrained("BabaK07/textract-ai", trust_remote_code=True)
image = Image.open("document.jpg")
result = model.generate_ocr_text(image, use_native=True)
result = model.generate_ocr_text(image, use_native=True) # Best accuracy
result = model.generate_ocr_text(image, use_native=False) # Faster processing
result = model.generate_ocr_text("path/to/your/image.jpg")
pip install torch transformers pillow
| Feature | Before (Broken) | After (FIXED) |
|---|---|---|
| Hub Loading | โ ValueError | โ Works perfectly |
| from_pretrained | โ Missing | โ Implemented |
| AutoModel | โ Failed | โ Compatible |
| Configuration | โ Invalid | โ Proper config |
For issues or questions, please check the model repository or contact the author.
Status: โ FIXED and ready for production use!