Spaces:
Sleeping
Sleeping
Commit
·
8b50086
1
Parent(s):
3a7c112
added try except
Browse files
app.py
CHANGED
|
@@ -40,7 +40,11 @@ if st.button('Encontre exemplos!'):
|
|
| 40 |
|
| 41 |
predictions = []
|
| 42 |
for review in df['preprocessed_review']:
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
if label == 'LABEL_0':
|
| 45 |
predictions.append('Negative')
|
| 46 |
else:
|
|
|
|
| 40 |
|
| 41 |
predictions = []
|
| 42 |
for review in df['preprocessed_review']:
|
| 43 |
+
try:
|
| 44 |
+
label = pipe(review)[0]['label']
|
| 45 |
+
except:
|
| 46 |
+
st.write("Ocorreu um erro de carregamento, tente novamente!")
|
| 47 |
+
|
| 48 |
if label == 'LABEL_0':
|
| 49 |
predictions.append('Negative')
|
| 50 |
else:
|