DanyaalMajid commited on
Commit
2027dac
1 Parent(s): 32e97e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -55,13 +55,12 @@ def main():
55
 
56
  # Parse JSON data
57
  data = emotion_text_classifier(user_text)
58
- st.write(data)
59
- # Extract and display label and score values
60
- for labels_and_scores in data:
61
- for entry in labels_and_scores:
62
- label = entry["label"]
63
- score = entry["score"]
64
- st.write(f"Label: {label}, Score: {score}")
65
 
66
  if analysis_type == "Named Entity Recognition":
67
  st.subheader("Named Entity Recognition:")
 
55
 
56
  # Parse JSON data
57
  data = emotion_text_classifier(user_text)
58
+ #st.write(data)
59
+ # Extract and display label and score for each entry
60
+ for entry in data:
61
+ label = entry["label"]
62
+ score = entry["score"]
63
+ print(f"Label: {label}, Score: {score}")
 
64
 
65
  if analysis_type == "Named Entity Recognition":
66
  st.subheader("Named Entity Recognition:")