Ashendilantha commited on
Commit
3dd54ed
·
verified ·
1 Parent(s): 69c1d9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -8,9 +8,9 @@ from nltk.stem import WordNetLemmatizer
8
  from transformers import pipeline
9
  from PIL import Image
10
 
11
- # Download NLTK resources
12
  nltk.download('stopwords')
13
- nltk.download('punkt') # For tokenization
14
 
15
  # Load Models
16
  news_classifier = pipeline("text-classification", model="Oneli/News_Classification")
@@ -152,3 +152,4 @@ if question:
152
  st.subheader("Confidence")
153
  st.progress(float(result["score"]))
154
  st.write(f"Confidence Score: {result['score']:.4f}")
 
 
8
  from transformers import pipeline
9
  from PIL import Image
10
 
11
+ # Ensure NLTK resources are downloaded correctly
12
  nltk.download('stopwords')
13
+ nltk.download('punkt')
14
 
15
  # Load Models
16
  news_classifier = pipeline("text-classification", model="Oneli/News_Classification")
 
152
  st.subheader("Confidence")
153
  st.progress(float(result["score"]))
154
  st.write(f"Confidence Score: {result['score']:.4f}")
155
+