Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
45 |
-
outputs = query(
|
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.")
|