Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,11 +26,10 @@ st.write("Your English intent classification model will be between these two mod
|
|
| 26 |
|
| 27 |
|
| 28 |
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
|
| 29 |
-
|
| 30 |
-
input = st.
|
| 31 |
outputs = translator(input)
|
| 32 |
st.write("Translated Example:")
|
| 33 |
-
translated_text = translator("How are you?")
|
| 34 |
st.write(outputs[0]["translation_text"])
|
| 35 |
st.write("You can check out this [link](https://huggingface.co/models?pipeline_tag=translation&sort=downloads&search=helsinki-nlp) for available translation models.")
|
| 36 |
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
|
| 29 |
+
default_value_tr = "How are you?"
|
| 30 |
+
input = st.text_input("Input", default_value_tr, key = "translation")
|
| 31 |
outputs = translator(input)
|
| 32 |
st.write("Translated Example:")
|
|
|
|
| 33 |
st.write(outputs[0]["translation_text"])
|
| 34 |
st.write("You can check out this [link](https://huggingface.co/models?pipeline_tag=translation&sort=downloads&search=helsinki-nlp) for available translation models.")
|
| 35 |
|