merve HF staff commited on
Commit
e792d8f
·
1 Parent(s): 744dc4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,9 +42,9 @@ model_id = "Helsinki-NLP/opus-mt-en-fr"
42
 
43
  default_value_tr = "How are you?"
44
  tr_input = st.text_area(label = "Input in English", value = default_value_tr, height = 5)
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.")
49
 
50
 
 
42
 
43
  default_value_tr = "How are you?"
44
  tr_input = st.text_area(label = "Input in English", value = default_value_tr, height = 5)
45
+ tr = query(tr_input, model_id, api_token)
46
  st.write("Translated Example:")
47
+ st.write(tr[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.")
49
 
50