PuristanLabs1 commited on
Commit
f39f590
·
verified ·
1 Parent(s): 1510baf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
11
  model, preprocess = clip.load("ViT-B/32", device=device)
12
 
13
  # Configuration
14
- FLAG_IMAGE_DIR = "/content/drive/MyDrive/Flags/flags"
15
 
16
  # Function to search flags with specific queries using CLIP
17
  def search_by_query(query, top_n=10):
@@ -45,7 +45,7 @@ image_paths = [
45
  ]
46
 
47
  # Load precomputed embeddings
48
- FLAG_EMBEDDINGS_PATH = "/content/drive/MyDrive/flag_embeddings_1.npy"
49
  flag_embeddings = np.load(FLAG_EMBEDDINGS_PATH, allow_pickle=True).item()
50
 
51
  def get_country_name(image_filename):
 
11
  model, preprocess = clip.load("ViT-B/32", device=device)
12
 
13
  # Configuration
14
+ FLAG_IMAGE_DIR = "./named_flags"
15
 
16
  # Function to search flags with specific queries using CLIP
17
  def search_by_query(query, top_n=10):
 
45
  ]
46
 
47
  # Load precomputed embeddings
48
+ FLAG_EMBEDDINGS_PATH = "./flag_embeddings_1.npy"
49
  flag_embeddings = np.load(FLAG_EMBEDDINGS_PATH, allow_pickle=True).item()
50
 
51
  def get_country_name(image_filename):