r1208 commited on
Commit
5de4564
·
verified ·
1 Parent(s): 2831fcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -75,15 +75,26 @@ def main():
75
 
76
 
77
  st.subheader("Enter text to translate")
78
- input_text = st.text_area("", height=300)
79
-
80
  if st.button("Translate"):
81
  if input_text:
82
- translation = translate(input_text)
83
  st.text_area("Translated Text", value=translation, height=300)
84
  else:
85
  st.error("Please enter some text to translate.")
86
 
 
 
 
 
 
 
 
 
 
 
 
87
  if __name__ == "__main__":
88
  main()
89
 
 
75
 
76
 
77
  st.subheader("Enter text to translate")
78
+ input_text = st.text_area("Text to Translate", value= {text_default}, height=300)
79
+
80
  if st.button("Translate"):
81
  if input_text:
82
+ translation = translate(input_text, tokenizer, model, bad_words_ids)
83
  st.text_area("Translated Text", value=translation, height=300)
84
  else:
85
  st.error("Please enter some text to translate.")
86
 
87
+
88
+ # st.subheader("Enter text to translate")
89
+ # input_text = st.text_area("", height=300)
90
+
91
+ # if st.button("Translate"):
92
+ # if input_text:
93
+ # translation = translate(input_text)
94
+ # st.text_area("Translated Text", value=translation, height=300)
95
+ # else:
96
+ # st.error("Please enter some text to translate.")
97
+
98
  if __name__ == "__main__":
99
  main()
100