varshakolanu commited on
Commit
2b053f0
·
verified ·
1 Parent(s): f2d1de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -5,13 +5,18 @@ import re
5
 
6
  # Download required NLTK resources
7
  try:
8
- nltk.data.find('vader_lexicon')
9
  except nltk.downloader.DownloadError:
10
  nltk.download('vader_lexicon')
 
 
 
11
  try:
12
- nltk.data.find('punkt')
13
  except nltk.downloader.DownloadError:
14
  nltk.download('punkt')
 
 
15
 
16
  def calculate_scores(work_completion, delay_reports, incident_logs):
17
  """
 
5
 
6
  # Download required NLTK resources
7
  try:
8
+ nltk.data.find('sentiment/vader_lexicon.zip')
9
  except nltk.downloader.DownloadError:
10
  nltk.download('vader_lexicon')
11
+ except LookupError:
12
+ nltk.download('vader_lexicon')
13
+
14
  try:
15
+ nltk.data.find('tokenizers/punkt/english.pickle')
16
  except nltk.downloader.DownloadError:
17
  nltk.download('punkt')
18
+ except LookupError:
19
+ nltk.download('punkt')
20
 
21
  def calculate_scores(work_completion, delay_reports, incident_logs):
22
  """