paul hilders commited on
Commit
ae6e057
1 Parent(s): a9114be

Second attempt

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -10,7 +10,7 @@ import CLIP.clip as clip
10
  import spacy
11
 
12
  import os
13
- os.system('python3 -m spacy download en_core_web_sm')
14
 
15
 
16
  from clip_grounding.utils.image import pad_to_square
@@ -27,7 +27,9 @@ clip.clip._MODELS = {
27
  device = "cuda" if torch.cuda.is_available() else "cpu"
28
  model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
29
 
30
- nlp = spacy.load("en_core_web_sm")
 
 
31
 
32
  # Gradio Section:
33
  def run_demo(image, text):
 
10
  import spacy
11
 
12
  import os
13
+ os.system('python -m spacy download en_core_web_sm')
14
 
15
 
16
  from clip_grounding.utils.image import pad_to_square
 
27
  device = "cuda" if torch.cuda.is_available() else "cpu"
28
  model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
29
 
30
+ # nlp = spacy.load("en_core_web_sm")
31
+ import en_core_web_sm
32
+ nlp = en_core_web_sm.load()
33
 
34
  # Gradio Section:
35
  def run_demo(image, text):