Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -15,13 +15,17 @@ This repository contains a pure Transformer-based checkpoint for Khmer OCR. Imag
|
|
| 15 |
|
| 16 |
## Installation
|
| 17 |
```python
|
| 18 |
-
pip install
|
| 19 |
```
|
| 20 |
## Usage
|
| 21 |
```python
|
| 22 |
-
from
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
print("Predicted text:", result)
|
| 27 |
```
|
|
|
|
| 15 |
|
| 16 |
## Installation
|
| 17 |
```python
|
| 18 |
+
pip install onnxruntime pillow torch torchvision numpy
|
| 19 |
```
|
| 20 |
## Usage
|
| 21 |
```python
|
| 22 |
+
from onnx_inference import ONNXPredictor
|
| 23 |
|
| 24 |
+
predictor = ONNXPredictor(
|
| 25 |
+
model_path="model.onnx",
|
| 26 |
+
config_path="config.json",
|
| 27 |
+
providers=["CPUExecutionProvider"], # or include CUDAExecutionProvider if available
|
| 28 |
+
)
|
| 29 |
+
result = predictor.predict("sample_image.png")
|
| 30 |
print("Predicted text:", result)
|
| 31 |
```
|