Spaces:
Runtime error
Runtime error
fixed the new line in the translation
Browse files
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"
|