Update README.md
Browse files
README.md
CHANGED
@@ -25,27 +25,31 @@ Model was trained with 512 neurons and 1 epoch.
|
|
25 |
**Requirements**
|
26 |
|
27 |
Xρειάστηκαν οι παρακάτω βιβλιοθήκες:
|
|
|
28 |
We need to install the transformers library through pip along with PyTorch.
|
29 |
|
|
|
30 |
import transformers
|
31 |
import torch
|
32 |
-
|
33 |
**Load Pretrained Model**
|
34 |
|
|
|
35 |
from transformers import AutoTokenizer,AutoModel
|
36 |
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-greek-uncased-v1")
|
37 |
loaded_model = AutoModel.from_pretrained("glossAPI/Greek_Variety_Classifier")
|
|
|
38 |
|
39 |
**Map definition for the supported varieties of Greek**
|
40 |
|
|
|
41 |
category_map = {
|
42 |
0: 'αρχαία/προμεσαιωνική',
|
43 |
1: 'κνε',
|
44 |
2: 'δημοτική',
|
45 |
3: 'καθαρεύουσα'
|
46 |
}
|
47 |
-
|
48 |
-
|
49 |
|
50 |
|
51 |
Για οποιοδήποτε ζήτημα, επικοινωνήστε: [email protected]
|
|
|
25 |
**Requirements**
|
26 |
|
27 |
Xρειάστηκαν οι παρακάτω βιβλιοθήκες:
|
28 |
+
|
29 |
We need to install the transformers library through pip along with PyTorch.
|
30 |
|
31 |
+
```python
|
32 |
import transformers
|
33 |
import torch
|
34 |
+
```
|
35 |
**Load Pretrained Model**
|
36 |
|
37 |
+
```python
|
38 |
from transformers import AutoTokenizer,AutoModel
|
39 |
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-greek-uncased-v1")
|
40 |
loaded_model = AutoModel.from_pretrained("glossAPI/Greek_Variety_Classifier")
|
41 |
+
```
|
42 |
|
43 |
**Map definition for the supported varieties of Greek**
|
44 |
|
45 |
+
```python
|
46 |
category_map = {
|
47 |
0: 'αρχαία/προμεσαιωνική',
|
48 |
1: 'κνε',
|
49 |
2: 'δημοτική',
|
50 |
3: 'καθαρεύουσα'
|
51 |
}
|
52 |
+
```
|
|
|
53 |
|
54 |
|
55 |
Για οποιοδήποτε ζήτημα, επικοινωνήστε: [email protected]
|