SarahMakk commited on
Commit
5190f16
·
verified ·
1 Parent(s): 17c494d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
  import nltk
4
- import numpy as np
5
 
6
  # Download NLTK data for sentence tokenization
7
  nltk.download('punkt')
@@ -39,7 +38,7 @@ threshold = st.slider(
39
  max_value=1.0,
40
  value=0.2,
41
  step=0.05,
42
- help="Categories with confidence scores above this threshold will be displayed."
43
  )
44
 
45
  # Classify button
@@ -77,10 +76,8 @@ if st.button("Classify Feedback"):
77
  "sentiment_score": sentiment_score
78
  })
79
 
80
- # Display the results
81
  st.subheader("Categorized Feedback with Sentiment Analysis")
82
-
83
- # Flag to check if any categories were found
84
  found_categories = False
85
 
86
  for category, results in category_results.items():
 
1
  import streamlit as st
2
  from transformers import pipeline
3
  import nltk
 
4
 
5
  # Download NLTK data for sentence tokenization
6
  nltk.download('punkt')
 
38
  max_value=1.0,
39
  value=0.2,
40
  step=0.05,
41
+ help="Categories with scores above this threshold will be displayed."
42
  )
43
 
44
  # Classify button
 
76
  "sentiment_score": sentiment_score
77
  })
78
 
79
+ # Check if there are any relevant categories
80
  st.subheader("Categorized Feedback with Sentiment Analysis")
 
 
81
  found_categories = False
82
 
83
  for category, results in category_results.items():