peace4ever commited on
Commit
4c2bf52
1 Parent(s): 1daf06e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,9 +16,10 @@ if text is not None:
16
  col1.header("Sentiment")
17
  col2.header("Probability")
18
 
19
- for label, probability in zip(predictions[0]["label"], predictions[0]["score"]):
20
- col1.write(label) # Display sentiment label (e.g., "POSITIVE", "NEGATIVE")
21
- col2.write(f"{probability:.2f}") # Display probability with 2 decimal places
 
22
 
23
 
24
 
 
16
  col1.header("Sentiment")
17
  col2.header("Probability")
18
 
19
+ label = predictions[0]["label"]
20
+ probability = predictions[0]["score"]
21
+ col1.write(label)
22
+ col2.write(f"{probability:.2f}")
23
 
24
 
25