Qilex commited on
Commit
c9dfef5
β€’
1 Parent(s): dad8833

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ infer = AutoModelForSeq2SeqLM.from_pretrained("Qilex/bart-largeEN-ME")
6
 
7
  def translate(sentence):
8
  input_ids = tokenizer(sentence, return_tensors="pt").input_ids
9
- outputs = infer.generate(input_ids, max_new_tokens = len(sample.split(' '))*10)
10
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
11
 
12
  title = "English to Middle English Translator"
 
6
 
7
  def translate(sentence):
8
  input_ids = tokenizer(sentence, return_tensors="pt").input_ids
9
+ outputs = infer.generate(input_ids, max_new_tokens = len(sentence.split(' '))*10)
10
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
11
 
12
  title = "English to Middle English Translator"