Commit
·
bd1ea33
1
Parent(s):
60a9da2
Delete README.md
Browse files
README.md
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
---
|
2 |
-
language:
|
3 |
-
- en
|
4 |
-
---
|
5 |
-
# RUN
|
6 |
-
|
7 |
-
## BERT Language Model
|
8 |
-
|
9 |
-
```python
|
10 |
-
from transformers import pipeline
|
11 |
-
|
12 |
-
model_path = "/language-ml-lab/iranian-azerbaijani-nlp/AzerBert/checkpoint-11630"
|
13 |
-
tokenizer_path = "/language-ml-lab/iranian-azerbaijani-nlp/AzerBert"
|
14 |
-
fill_mask = pipeline("fill-mask", model=model_path, tokenizer=tokenizer_path)
|
15 |
-
|
16 |
-
example = "خارجدن یئمک گتیریلمهسینه امکان وئرمیردیلر [MASK]"
|
17 |
-
arr_example = example.split(" ")
|
18 |
-
result = fill_mask(example, arr_example)
|
19 |
-
|
20 |
-
for prediction in result:
|
21 |
-
print("Predicted Word: ", prediction["token_str"])
|
22 |
-
print(f"Final sentence: {prediction['sequence']}, confidence: {prediction['score']}")
|
23 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|