Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
|
4 |
-
classifier = pipeline("
|
5 |
def main():
|
6 |
st.title("Thai language in twitter")
|
7 |
|
@@ -10,7 +10,7 @@ def main():
|
|
10 |
# clicked==True only when the button is clicked
|
11 |
clicked = st.form_submit_button("Submit")
|
12 |
if clicked:
|
13 |
-
results =
|
14 |
st.json(results)
|
15 |
|
16 |
if __name__ == "__main__":
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
+
translator = pipeline("translation_en_to_de",model="Helsinki-NLP/opus-mt-mul-en", max_length=40)
|
4 |
+
#classifier = pipeline("translation", model="Helsinki-NLP/opus-mt-mul-en")
|
5 |
def main():
|
6 |
st.title("Thai language in twitter")
|
7 |
|
|
|
10 |
# clicked==True only when the button is clicked
|
11 |
clicked = st.form_submit_button("Submit")
|
12 |
if clicked:
|
13 |
+
results = translator([text])
|
14 |
st.json(results)
|
15 |
|
16 |
if __name__ == "__main__":
|