PardisSzah commited on
Commit
17465f4
1 Parent(s): f44b467

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -3
README.md CHANGED
@@ -14,13 +14,12 @@ This model is fine-tuned to generate formal text from informal text based on the
14
 
15
  ```python
16
 
17
- from transformers import AutoModelForSeq2SeqLM, MT5Tokenizer
 
18
 
19
  model = T5ForConditionalGeneration.from_pretrained('PardisSzah/PersianTextFormalizer')
20
  tokenizer = AutoTokenizer.from_pretrained('PardisSzah/PersianTextFormalizer')
21
 
22
- from transformers import (T5ForConditionalGeneration, AutoTokenizer, pipeline)
23
- import torch
24
  pipe = pipeline(task='text2text-generation', model=model, tokenizer=tokenizer)
25
  def test_model(text):
26
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
14
 
15
  ```python
16
 
17
+ from transformers import (T5ForConditionalGeneration, AutoTokenizer, pipeline)
18
+ import torch
19
 
20
  model = T5ForConditionalGeneration.from_pretrained('PardisSzah/PersianTextFormalizer')
21
  tokenizer = AutoTokenizer.from_pretrained('PardisSzah/PersianTextFormalizer')
22
 
 
 
23
  pipe = pipeline(task='text2text-generation', model=model, tokenizer=tokenizer)
24
  def test_model(text):
25
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')