Aomsin commited on
Commit
51c5ffc
·
1 Parent(s): 760945c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
-
4
- classifier = pipeline("text-classification", model="thai_toxicity_tweet",use_auth_token=True)
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 = classifier([text])
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__":