Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
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"
|