Spaces:
Build error
Build error
dentadelta123
commited on
Commit
•
c30cdc1
1
Parent(s):
dc52600
added device to file
Browse files
app.py
CHANGED
@@ -11,7 +11,8 @@ except ImportError:
|
|
11 |
import warnings
|
12 |
warnings.filterwarnings("ignore")
|
13 |
|
14 |
-
|
|
|
15 |
|
16 |
|
17 |
def zeroshot_detection(Press_Clear_Dont_Stack_Image):
|
|
|
11 |
import warnings
|
12 |
warnings.filterwarnings("ignore")
|
13 |
|
14 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
+
model, preprocess = clip.load('ViT-L/14@336px').to(device)
|
16 |
|
17 |
|
18 |
def zeroshot_detection(Press_Clear_Dont_Stack_Image):
|