Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,8 @@ pipeline = pipeline(task="translation", model="guymorlan/Shami2English")
|
|
5 |
|
6 |
st.title("Levantine Arabic to English")
|
7 |
|
8 |
-
|
9 |
-
input_text =
|
10 |
-
num_translations = row[1]
|
11 |
|
12 |
if text:
|
13 |
result = pipeline(input_text, max_length=1024, num_return_sequences=num_translations, num_beams=num_translations)[0]['generated_text']
|
|
|
5 |
|
6 |
st.title("Levantine Arabic to English")
|
7 |
|
8 |
+
num_translations = st.sidebar.selectbox("Number of Translations:", [1, 2, 3, 4, 5], index=2)
|
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']
|