Nathan Butters commited on
Commit
7c4b588
1 Parent(s): 05cd84e

update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,7 +1,10 @@
1
  #Import the libraries we know we'll need for the Generator.
2
- import pandas as pd, spacy, nltk, numpy as np, re
3
  from spacy.matcher import Matcher
4
- !python -m spacy download en_core_web_lg
 
 
 
5
  nlp = spacy.load("en_core_web_lg")
6
  from nltk.corpus import wordnet
7
 
@@ -347,4 +350,4 @@ if layout == 'VizNLC':
347
  size=alt.Size('seed:O'),
348
  tooltip=('Categories','text','pred')
349
  ).mark_circle(opacity=.5).properties(width=450, height=450).add_selection(single_nearest)
350
- st.altair_chart(full)
 
1
  #Import the libraries we know we'll need for the Generator.
2
+ import pandas as pd, spacy, nltk, numpy as np, re, os
3
  from spacy.matcher import Matcher
4
+
5
+ #Attempting to fix the issue with spacy model in a more intuitive way.
6
+ script = "python -m spacy download en_core_web_lg"
7
+ os.system("bash -c '%s'" % script)
8
  nlp = spacy.load("en_core_web_lg")
9
  from nltk.corpus import wordnet
10
 
 
350
  size=alt.Size('seed:O'),
351
  tooltip=('Categories','text','pred')
352
  ).mark_circle(opacity=.5).properties(width=450, height=450).add_selection(single_nearest)
353
+ st.altair_chart(full)