Spaces:
Runtime error
Runtime error
paul hilders
commited on
Commit
·
bb28bbd
1
Parent(s):
2a620ca
Add en_core_web_sm
Browse files- app.py +1 -3
- requirements.txt +2 -1
app.py
CHANGED
@@ -8,7 +8,6 @@ import torch
|
|
8 |
import CLIP.clip as clip
|
9 |
|
10 |
import spacy
|
11 |
-
import en_core_web_sm
|
12 |
|
13 |
|
14 |
from clip_grounding.utils.image import pad_to_square
|
@@ -25,8 +24,7 @@ clip.clip._MODELS = {
|
|
25 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
26 |
model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
|
27 |
|
28 |
-
|
29 |
-
nlp = en_core_web_sm.load()
|
30 |
|
31 |
# Gradio Section:
|
32 |
def run_demo(image, text):
|
|
|
8 |
import CLIP.clip as clip
|
9 |
|
10 |
import spacy
|
|
|
11 |
|
12 |
|
13 |
from clip_grounding.utils.image import pad_to_square
|
|
|
24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
|
26 |
|
27 |
+
nlp = spacy.load("en_core_web_sm")
|
|
|
28 |
|
29 |
# Gradio Section:
|
30 |
def run_demo(image, text):
|
requirements.txt
CHANGED
@@ -98,7 +98,8 @@ six==1.16.0
|
|
98 |
sniffio==1.2.0
|
99 |
soupsieve==2.3.2.post1
|
100 |
spacy
|
101 |
-
|
|
|
102 |
stack-data==0.3.0
|
103 |
tangled-up-in-unicode==0.2.0
|
104 |
termcolor==1.1.0
|
|
|
98 |
sniffio==1.2.0
|
99 |
soupsieve==2.3.2.post1
|
100 |
spacy
|
101 |
+
spacytextblob
|
102 |
+
https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl
|
103 |
stack-data==0.3.0
|
104 |
tangled-up-in-unicode==0.2.0
|
105 |
termcolor==1.1.0
|