Update README.md
Browse files
README.md
CHANGED
@@ -83,7 +83,7 @@ from transformers import GPT2Tokenizer
|
|
83 |
from pyarabic.araby import strip_diacritics,strip_tatweel
|
84 |
from arabert.aragpt2.grover.modeling_gpt2 import GPT2LMHeadModel
|
85 |
from transformers import pipeline
|
86 |
-
|
87 |
model_name='alsubari/aragpt2-mega-pos-msa'
|
88 |
|
89 |
|
@@ -98,7 +98,7 @@ def generate(text):
|
|
98 |
num_beams=20,
|
99 |
max_length=256,
|
100 |
#min_length = 200,
|
101 |
-
|
102 |
top_p=0.5,
|
103 |
top_k=1,
|
104 |
repetition_penalty = 3.0,
|
|
|
83 |
from pyarabic.araby import strip_diacritics,strip_tatweel
|
84 |
from arabert.aragpt2.grover.modeling_gpt2 import GPT2LMHeadModel
|
85 |
from transformers import pipeline
|
86 |
+
import re
|
87 |
model_name='alsubari/aragpt2-mega-pos-msa'
|
88 |
|
89 |
|
|
|
98 |
num_beams=20,
|
99 |
max_length=256,
|
100 |
#min_length = 200,
|
101 |
+
do_sample=False,
|
102 |
top_p=0.5,
|
103 |
top_k=1,
|
104 |
repetition_penalty = 3.0,
|