Update README.md
Browse files
README.md
CHANGED
|
@@ -47,7 +47,7 @@ All tensors have shape `(batch_size, max_length)`.
|
|
| 47 |
|
| 48 |
## 🚀 Usage
|
| 49 |
|
| 50 |
-
###
|
| 51 |
|
| 52 |
```python
|
| 53 |
from huggingface_hub import snapshot_download
|
|
@@ -71,7 +71,7 @@ bert_tokenizer = AutoTokenizer.from_pretrained("leeeov4/PIDIT/bert_tokenizer")
|
|
| 71 |
alberto_tokenizer = AutoTokenizer.from_pretrained("leeeov4/PIDIT/alberto_tokenizer")
|
| 72 |
```
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
```python
|
| 77 |
def preprocess_text(text, max_length=250):
|
|
@@ -90,7 +90,7 @@ def preprocess_text(text, max_length=250):
|
|
| 90 |
```
|
| 91 |
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
```python
|
| 96 |
text = "Questo è un esempio di testo italiano per testare il modello."
|
|
|
|
| 47 |
|
| 48 |
## 🚀 Usage
|
| 49 |
|
| 50 |
+
### Load model and tokenizers
|
| 51 |
|
| 52 |
```python
|
| 53 |
from huggingface_hub import snapshot_download
|
|
|
|
| 71 |
alberto_tokenizer = AutoTokenizer.from_pretrained("leeeov4/PIDIT/alberto_tokenizer")
|
| 72 |
```
|
| 73 |
|
| 74 |
+
### Preprocessing Example
|
| 75 |
|
| 76 |
```python
|
| 77 |
def preprocess_text(text, max_length=250):
|
|
|
|
| 90 |
```
|
| 91 |
|
| 92 |
|
| 93 |
+
### Inference
|
| 94 |
|
| 95 |
```python
|
| 96 |
text = "Questo è un esempio di testo italiano per testare il modello."
|