Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OCR Model
|
2 |
+
|
3 |
+
This is an OCR model trained with PyTorch Lightning.
|
4 |
+
|
5 |
+
## Files
|
6 |
+
|
7 |
+
- `final_model.pt`: Original model file
|
8 |
+
- `pytorch_model.bin`: Same model with HuggingFace naming convention
|
9 |
+
|
10 |
+
## Usage
|
11 |
+
|
12 |
+
```python
|
13 |
+
import torch
|
14 |
+
|
15 |
+
# Load using original filename
|
16 |
+
model = torch.load("final_model.pt")
|
17 |
+
|
18 |
+
# Or using HuggingFace convention
|
19 |
+
model = torch.load("pytorch_model.bin")
|
20 |
+
|
21 |
+
model.eval()
|
22 |
+
```
|