Document Question Answering
Transformers
PyTorch
English
document-processing
ocr
ner
text-classification
information-extraction
invoice
receipt
form
Instructions to use mrrobot2610/IDP-Machine-learning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrrobot2610/IDP-Machine-learning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("document-question-answering", model="mrrobot2610/IDP-Machine-learning")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mrrobot2610/IDP-Machine-learning", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download test_mutex_fix.py from mrrobot2610/IDP-Machine-learning: direct link, hf CLI and curl.
- Browser
- Download file 806 Bytes
-
https://huggingface.co/mrrobot2610/IDP-Machine-learning/resolve/main/test_mutex_fix.py
- Command line
-
hf download hf://mrrobot2610/IDP-Machine-learning/test_mutex_fix.py
-
curl -L -o test_mutex_fix.py https://huggingface.co/mrrobot2610/IDP-Machine-learning/resolve/main/test_mutex_fix.py
806 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Quick test to verify mutex lock fix | |
| """ | |
| # Fix for TensorFlow/PaddlePaddle mutex warnings on macOS | |
| import os | |
| os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE' | |
| os.environ['OMP_NUM_THREADS'] = '1' | |
| os.environ['OPENBLAS_NUM_THREADS'] = '1' | |
| os.environ['MKL_NUM_THREADS'] = '1' | |
| os.environ['VECLIB_MAXIMUM_THREADS'] = '1' | |
| os.environ['NUMEXPR_NUM_THREADS'] = '1' | |
| os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' | |
| import warnings | |
| warnings.filterwarnings('ignore') | |
| print("Testing PaddleOCR import...") | |
| from paddleocr import PaddleOCR | |
| print("✓ PaddleOCR imported successfully without mutex warnings!") | |
| print("\nInitializing PaddleOCR...") | |
| ocr = PaddleOCR(lang='en', use_angle_cls=True) | |
| print("✓ PaddleOCR initialized successfully!") | |
| print("\n✅ All tests passed! The mutex lock issue is fixed.") | |