Leonard Püttmann commited on
Commit
7f29446
·
verified ·
1 Parent(s): 9b8dbaa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
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/mt0-Quadrifoglio-mt-it-en")
31
- model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-it-en")
32
 
33
  def generate_response(input_text):
34
  input_ids = tokenizer("translate Italian to English:" + input_text, return_tensors="pt").input_ids
@@ -49,8 +49,8 @@ import spacy
49
 
50
  nlp = spacy.load("it_core_news_sm")
51
 
52
- tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-it-en")
53
- model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-it-en")
54
 
55
  def generate_response(input_text):
56
  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-it-en")
31
+ model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-it-en")
32
 
33
  def generate_response(input_text):
34
  input_ids = tokenizer("translate Italian to English:" + input_text, return_tensors="pt").input_ids
 
49
 
50
  nlp = spacy.load("it_core_news_sm")
51
 
52
+ tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-it-en")
53
+ model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/Quadrifoglio-mt-it-en")
54
 
55
  def generate_response(input_text):
56
  input_ids = tokenizer("translate Italian to English: " + input_text, return_tensors="pt").input_ids