JasonTPhillipsJr commited on
Commit
dc4eaac
·
verified ·
1 Parent(s): ce45442

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -3,13 +3,9 @@ import spacy
3
  from transformers import pipeline
4
  from PIL import Image
5
 
6
- # Check if the model is installed, if not, download it
7
- try:
8
- nlp = spacy.load("en_core_web_sm")
9
- except OSError:
10
- st.write("Downloading spaCy model...")
11
- subprocess.run(["python", "-m", "spacy", "download", "en_core_web_sm"])
12
- nlp = spacy.load("en_core_web_sm")
13
 
14
  st.title("SpaGAN Demo")
15
  st.write("Enter a text, and the system will highlight the geo-entities within it.")
 
3
  from transformers import pipeline
4
  from PIL import Image
5
 
6
+ python -m spacy download en_core_web_sm
7
+
8
+ nlp = spacy.load("en_core_web_sm")
 
 
 
 
9
 
10
  st.title("SpaGAN Demo")
11
  st.write("Enter a text, and the system will highlight the geo-entities within it.")