Spaces:
Runtime error
Runtime error
Commit
·
1960023
1
Parent(s):
07a5159
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,8 @@ classifier = pipeline("sentiment-analysis", model=mod, tokenizer=TKR)
|
|
17 |
# result = classifier(["This is a sample text made by Sean Ramirez.", "This is another sample text."]) # leftover from initial testing
|
18 |
|
19 |
if user_input is not None:
|
20 |
-
col = st.columns(1)
|
21 |
predicts = pipeline("sentiment-analysis", model=mod, tokenizer=TKR)
|
22 |
|
23 |
-
|
24 |
for p in predicts:
|
25 |
-
|
|
|
17 |
# result = classifier(["This is a sample text made by Sean Ramirez.", "This is another sample text."]) # leftover from initial testing
|
18 |
|
19 |
if user_input is not None:
|
|
|
20 |
predicts = pipeline("sentiment-analysis", model=mod, tokenizer=TKR)
|
21 |
|
22 |
+
st.markdown("##Probabilities")
|
23 |
for p in predicts:
|
24 |
+
st.write(f"{ p['label']}: { round(p['score'] * 100, 1)}%")
|