Leonard Püttmann
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -27,8 +27,8 @@ Quadrifoglio is an encoder-decoder transformer model for English-Italian text tr
|
|
27 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
28 |
|
29 |
# Load model and tokenizer from checkpoint directory
|
30 |
-
tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/
|
31 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/
|
32 |
|
33 |
def generate_response(input_text):
|
34 |
input_ids = tokenizer("translate English to Italian:" + input_text, return_tensors="pt").input_ids
|
@@ -50,8 +50,8 @@ import spacy
|
|
50 |
|
51 |
nlp = spacy.load("en_core_web_sm")
|
52 |
|
53 |
-
tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/
|
54 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/
|
55 |
|
56 |
def generate_response(input_text):
|
57 |
input_ids = tokenizer("translate Italian to English: " + input_text, return_tensors="pt").input_ids
|
|
|
27 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
28 |
|
29 |
# Load model and tokenizer from checkpoint directory
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-en-it")
|
31 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-en-it")
|
32 |
|
33 |
def generate_response(input_text):
|
34 |
input_ids = tokenizer("translate English to Italian:" + input_text, return_tensors="pt").input_ids
|
|
|
50 |
|
51 |
nlp = spacy.load("en_core_web_sm")
|
52 |
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-en-it")
|
54 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-en-it")
|
55 |
|
56 |
def generate_response(input_text):
|
57 |
input_ids = tokenizer("translate Italian to English: " + input_text, return_tensors="pt").input_ids
|