Leonard Püttmann
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,7 @@ tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/Foglietta-mt-en-it")
|
|
52 |
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Foglietta-mt-en-it")
|
53 |
|
54 |
def generate_response(input_text):
|
55 |
-
input_ids = tokenizer("translate
|
56 |
output = model.generate(input_ids, max_new_tokens=256)
|
57 |
return tokenizer.decode(output[0], skip_special_tokens=True)
|
58 |
|
|
|
52 |
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Foglietta-mt-en-it")
|
53 |
|
54 |
def generate_response(input_text):
|
55 |
+
input_ids = tokenizer("translate English to Italian: " + input_text, return_tensors="pt").input_ids
|
56 |
output = model.generate(input_ids, max_new_tokens=256)
|
57 |
return tokenizer.decode(output[0], skip_special_tokens=True)
|
58 |
|