Aminrhmni commited on
Commit
054affb
1 Parent(s): 2fda366

Update README.md

Browse files

Hey there
***This model is intended for non-commercial use only. If you wish to use it for commercial purposes, please make sure to refer to this LinkedIn address.

"Viravirast" is an editor based on transformer algorithms. By visiting the Viravirast.com, you can use a Persian semantic and structural text editor.


usage

from transformers import (
T5Tokenizer,
MT5ForConditionalGeneration,
Text2TextGenerationPipeline,
)

path = ""
pipe = Text2TextGenerationPipeline(
model=MT5ForConditionalGeneration.from_pretrained(path),
tokenizer=T5Tokenizer.from_pretrained(path),
)

sentence = "ویراویراست یک نرم افزار ویرایش متن ساختاری و معنایی زبان فارسی است چیزی شبیه به گرامرلی در زبان انگلیسی"
#res = pipe(sentence, max_length=100, num_beams=4)
res = pipe(sentence, max_length=100)
print(res[0]['generated_text'])

n_epochs = 4
train_batch_size = 8
eval_batch_size = 4
lr = 5e-4

Training loss = 0.005501
Validation loss= 0.052046

Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -1,3 +1,5 @@
1
  ---
2
  license: mit
3
- ---
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - fa
5
+ ---