EnzoBustos commited on
Commit
69fee20
1 Parent(s): 2229429

Update tranlate function

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,7 +6,10 @@ import streamlit as st
6
 
7
  def translate_text(text):
8
  blob = TextBlob(text)
9
- return str(blob.translate(from_lang="pt", to="en"))
 
 
 
10
 
11
  def sentiment_classification(sentence, vader_object):
12
 
 
6
 
7
  def translate_text(text):
8
  blob = TextBlob(text)
9
+ try:
10
+ return str(blob.translate(from_lang="pt", to="en"))
11
+ except:
12
+ return text
13
 
14
  def sentiment_classification(sentence, vader_object):
15