Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,8 @@ def get_url_im(t):
|
|
37 |
|
38 |
@torch.no_grad()
|
39 |
def get_im_c(im_path, clip_model):
|
40 |
-
|
41 |
-
prompts = preprocess(
|
42 |
return clip_model.encode_image(prompts).float()
|
43 |
|
44 |
@torch.no_grad()
|
|
|
37 |
|
38 |
@torch.no_grad()
|
39 |
def get_im_c(im_path, clip_model):
|
40 |
+
im = Image.open(im_path).convert("RGB")
|
41 |
+
prompts = preprocess(im).to(device).unsqueeze(0)
|
42 |
return clip_model.encode_image(prompts).float()
|
43 |
|
44 |
@torch.no_grad()
|