Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -59,17 +59,18 @@ ENDING = """For search acceleration capabilities, please refer to [Searchium.ai]
|
|
59 |
|
60 |
|
61 |
DATA_PATH = '/home/user'
|
62 |
-
huggingface_hub.snapshot_download(repo_id="Searchium-ai/clip4clip-webvid150k", repo_type="model", cache_dir=DATA_PATH)
|
63 |
|
64 |
-
ft_visual_features_file =
|
65 |
-
ft_visual_features_file_bin =
|
66 |
|
67 |
#load database features:
|
68 |
ft_visual_features_database_bin = np.load(ft_visual_features_file_bin)
|
69 |
ft_visual_features_database = np.load(ft_visual_features_file, mmap_mode='r')
|
70 |
|
71 |
|
72 |
-
|
|
|
73 |
database_df = pd.read_csv(database_csv_path)
|
74 |
|
75 |
class NearestNeighbors:
|
|
|
59 |
|
60 |
|
61 |
DATA_PATH = '/home/user'
|
62 |
+
downloaded_path = huggingface_hub.snapshot_download(repo_id="Searchium-ai/clip4clip-webvid150k", repo_type="model", cache_dir=DATA_PATH)
|
63 |
|
64 |
+
ft_visual_features_file = downloaded_path +'/new_data/video_half_dataset_visual_features.npy'
|
65 |
+
ft_visual_features_file_bin = downloaded_path + '/new_data/video_half_dataset_visual_features_binary_packed.npy'
|
66 |
|
67 |
#load database features:
|
68 |
ft_visual_features_database_bin = np.load(ft_visual_features_file_bin)
|
69 |
ft_visual_features_database = np.load(ft_visual_features_file, mmap_mode='r')
|
70 |
|
71 |
|
72 |
+
|
73 |
+
database_csv_path = downloaded_path + '/new_data/video_half_dataset.csv')
|
74 |
database_df = pd.read_csv(database_csv_path)
|
75 |
|
76 |
class NearestNeighbors:
|