cahya commited on
Commit
d38538c
1 Parent(s): 32d232b

fixed the new line in the translation

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -129,7 +129,7 @@ text = st.text_area("Enter text", prompt_box)
129
 
130
  if st.button("Run"):
131
  with st.spinner(text="Getting results..."):
132
- lang_predictions, lang_probability = ft_model.predict(text, k=3)
133
  # print(f"lang: {lang_predictions}, {lang_probability}")
134
  if "__label__id" in lang_predictions:
135
  lang = "id"
 
129
 
130
  if st.button("Run"):
131
  with st.spinner(text="Getting results..."):
132
+ lang_predictions, lang_probability = ft_model.predict(text.replace("\n", " "), k=3)
133
  # print(f"lang: {lang_predictions}, {lang_probability}")
134
  if "__label__id" in lang_predictions:
135
  lang = "id"