Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -84,6 +84,7 @@ def main():
|
|
84 |
if st.button("Translate"):
|
85 |
if input_text:
|
86 |
translation = translate(input_text, tokenizer, model, do_sample = do_sample, max_new_tokens = max_new_tokens, temperature = temperature, top_k = top_k, top_p = top_p, bad_words_ids = bad_words_ids)
|
|
|
87 |
st.text_area("Translated Text", value=translation, height=300)
|
88 |
else:
|
89 |
st.error("Please enter some text to translate.")
|
|
|
84 |
if st.button("Translate"):
|
85 |
if input_text:
|
86 |
translation = translate(input_text, tokenizer, model, do_sample = do_sample, max_new_tokens = max_new_tokens, temperature = temperature, top_k = top_k, top_p = top_p, bad_words_ids = bad_words_ids)
|
87 |
+
translation = translation[0]
|
88 |
st.text_area("Translated Text", value=translation, height=300)
|
89 |
else:
|
90 |
st.error("Please enter some text to translate.")
|