merve HF staff commited on
Commit
3f22696
·
1 Parent(s): 005e1dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,8 +41,8 @@ model_id = "Helsinki-NLP/opus-mt-en-fr"
41
 
42
  #translator = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
43
  default_value_tr = "How are you?"
44
- input = st.text_input("Input in English", default_value_tr, key = "translation")
45
- outputs = query(input, model_id, api_token)
46
  st.write("Translated Example:")
47
  st.write(outputs[0]["translation_text"])
48
  st.write("You can check out this [link](https://huggingface.co/models?pipeline_tag=translation&sort=downloads&search=helsinki-nlp) for available translation models.")
 
41
 
42
  #translator = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
43
  default_value_tr = "How are you?"
44
+ tr_input = st.text_input("Input in English", default_value_tr, key = "translation")
45
+ outputs = query(tr_input, model_id, api_token)
46
  st.write("Translated Example:")
47
  st.write(outputs[0]["translation_text"])
48
  st.write("You can check out this [link](https://huggingface.co/models?pipeline_tag=translation&sort=downloads&search=helsinki-nlp) for available translation models.")