mynti commited on
Commit
f8cb6da
1 Parent(s): d36c995

tokenizer 512 max length

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
5
 
6
  def simplify(text):
7
  model= T5ForConditionalGeneration.from_pretrained("mynti/plainly-v1")
8
- tokenizer = T5Tokenizer.from_pretrained('t5-base')
9
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
10
  model = model.to(device)
11
  preprocess_text = "simplify: " + text.strip()
 
5
 
6
  def simplify(text):
7
  model= T5ForConditionalGeneration.from_pretrained("mynti/plainly-v1")
8
+ tokenizer = T5Tokenizer.from_pretrained('t5-base', model_max_length=512)
9
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
10
  model = model.to(device)
11
  preprocess_text = "simplify: " + text.strip()