davidmezzetti commited on
Commit
dcff7bb
1 Parent(s): 49a4b29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -7,6 +7,7 @@ Based on this example: https://github.com/neuml/txtai/blob/master/examples/workf
7
  import os
8
  import re
9
 
 
10
  import yaml
11
 
12
  import pandas as pd
@@ -376,6 +377,11 @@ def create():
376
  if __name__ == "__main__":
377
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
378
 
 
 
 
 
 
379
  # Create and run application
380
  app = create()
381
  app.run()
 
7
  import os
8
  import re
9
 
10
+ import nltk
11
  import yaml
12
 
13
  import pandas as pd
 
377
  if __name__ == "__main__":
378
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
379
 
380
+ try:
381
+ nltk.sent_tokenize("This is a test. Split")
382
+ except:
383
+ nltk.download("punkt")
384
+
385
  # Create and run application
386
  app = create()
387
  app.run()