Spaces:
Runtime error
Runtime error
Commit
•
417d400
1
Parent(s):
b96b22e
Update image_search.py
Browse files- image_search.py +1 -1
image_search.py
CHANGED
@@ -45,7 +45,7 @@ def process_text(caption, tokenizer):
|
|
45 |
|
46 |
def search_images(search_text, image_path, k = 1):
|
47 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
48 |
-
model, tokenizer = load_model(device, model_path="
|
49 |
image_filenames = glob(image_path + "/*.jpg") + glob(image_path + "/*.JPEG") + glob(image_path + "/*.JPG") + glob(image_path + "/*.png") + glob(image_path + "/*.bmp")
|
50 |
print(f"Searching in image database >> {image_filenames}")
|
51 |
imgs = process_image(image_filenames)
|
|
|
45 |
|
46 |
def search_images(search_text, image_path, k = 1):
|
47 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
48 |
+
model, tokenizer = load_model(device, model_path="clip_bangla.pt")
|
49 |
image_filenames = glob(image_path + "/*.jpg") + glob(image_path + "/*.JPEG") + glob(image_path + "/*.JPG") + glob(image_path + "/*.png") + glob(image_path + "/*.bmp")
|
50 |
print(f"Searching in image database >> {image_filenames}")
|
51 |
imgs = process_image(image_filenames)
|