Commit
·
387bdf8
1
Parent(s):
c06f677
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ if text:
|
|
11 |
out = pipe(text)
|
12 |
|
13 |
# Convert the model's output (0 or 1) to descriptive labels
|
14 |
-
sentiment_label = "
|
15 |
|
16 |
# Display the sentiment label and probability
|
17 |
st.write(f'Sentiment: {sentiment_label}')
|
|
|
11 |
out = pipe(text)
|
12 |
|
13 |
# Convert the model's output (0 or 1) to descriptive labels
|
14 |
+
sentiment_label = "Negative" if out[0]['label'] == 'LABEL_1' else "Positive"
|
15 |
|
16 |
# Display the sentiment label and probability
|
17 |
st.write(f'Sentiment: {sentiment_label}')
|