Leonard Püttmann commited on
Commit
52d8d9c
·
verified ·
1 Parent(s): 46b9707

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-en-it")
31
- model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/mt0-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,8 +50,8 @@ import spacy
50
 
51
  nlp = spacy.load("en_core_web_sm")
52
 
53
- tokenizer = AutoTokenizer.from_pretrained("LeonardPuettmann/mt0-Quadrifoglio-mt-en-it")
54
- model = AutoModelForSeq2SeqLM.from_pretrained("LeonardPuettmann/mt0-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
 
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