Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,5 +9,5 @@ num_translations = st.sidebar.selectbox("Number of Translations:", [1, 2, 3, 4,
|
|
9 |
input_text = st.text_input("Enter English text:")
|
10 |
|
11 |
if text:
|
12 |
-
result = pipeline(input_text, max_length=1024, num_return_sequences=num_translations, num_beams=num_translations)[0]['generated_text']
|
13 |
st.markdown("<div style='font-size:24px; text-align:right; direction:rtl;'>{}</div>".format(result), unsafe_allow_html=True)
|
|
|
9 |
input_text = st.text_input("Enter English text:")
|
10 |
|
11 |
if text:
|
12 |
+
result = pipeline(input_text, max_length=1024, num_return_sequences=num_translations, num_beams=max(num_translations, 5))[0]['generated_text']
|
13 |
st.markdown("<div style='font-size:24px; text-align:right; direction:rtl;'>{}</div>".format(result), unsafe_allow_html=True)
|