ShamilF commited on
Commit
21ec6a9
1 Parent(s): f95af6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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
- st.title("English to Turkish Translator")
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
- 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()
 
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()