jjuarez commited on
Commit
5dc4868
1 Parent(s): fa513b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -1,13 +1,9 @@
1
  import gradio as gr
2
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
3
 
4
- # Load the saved model
5
- model_path = "https://huggingface.co/spaces/jjuarez/translation/raw/main/files/"
6
- model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
7
 
8
- # Load the tokenizer
9
- model_checkpoint = "domenicrosati/opus-mt-es-en-scielo"
10
- tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
11
 
12
  # Define the translation function
13
  def translate(text):
 
1
  import gradio as gr
2
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
3
 
 
 
 
4
 
5
+ tokenizer = AutoTokenizer.from_pretrained("jjuarez/translation_model")
6
+ model = AutoModelForSeq2SeqLM.from_pretrained("jjuarez/translation_model")
 
7
 
8
  # Define the translation function
9
  def translate(text):