philipp-zettl
commited on
Update README.md
Browse filesadd missing code-block langs
README.md
CHANGED
@@ -115,7 +115,7 @@ model = model.to(device)
|
|
115 |
```
|
116 |
|
117 |
Load dataset
|
118 |
-
```
|
119 |
from datasets import load_dataset
|
120 |
|
121 |
# Load dataset
|
@@ -127,7 +127,7 @@ validation_dataset = squad_dataset['test']
|
|
127 |
```
|
128 |
|
129 |
Preprocessing: tokenize inputs and labels for faster training cycles, i.e. no need for tokenization during training anymore
|
130 |
-
```
|
131 |
def preprocess_batch(batch, tokenizer, max_input_length=512, max_output_length=128):
|
132 |
contexts = batch['context']
|
133 |
answers = batch['question']
|
|
|
115 |
```
|
116 |
|
117 |
Load dataset
|
118 |
+
```python
|
119 |
from datasets import load_dataset
|
120 |
|
121 |
# Load dataset
|
|
|
127 |
```
|
128 |
|
129 |
Preprocessing: tokenize inputs and labels for faster training cycles, i.e. no need for tokenization during training anymore
|
130 |
+
```python
|
131 |
def preprocess_batch(batch, tokenizer, max_input_length=512, max_output_length=128):
|
132 |
contexts = batch['context']
|
133 |
answers = batch['question']
|