Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,15 +4,15 @@ from transformers import pipeline
|
|
4 |
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-tr")
|
5 |
|
6 |
def main():
|
7 |
-
|
8 |
-
|
9 |
-
# Use st.text_area with width parameter
|
10 |
-
input_text = st.text_area("Enter text in English:", height=100, width=500)
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
-
|
|
|
4 |
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-tr")
|
5 |
|
6 |
def main():
|
7 |
+
st.title("English to Turkish Translator")
|
|
|
|
|
|
|
8 |
|
9 |
+
# Use st.markdown to set the width with HTML
|
10 |
+
input_text = st.text_area("Enter text in English:", height=100)
|
11 |
+
|
12 |
+
if input_text:
|
13 |
+
translation = pipe(input_text)[0]["translation_text"]
|
14 |
+
st.write("Translation:")
|
15 |
+
st.write(translation)
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
+
main()
|