Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ from IPython import display
|
|
| 6 |
import faiss
|
| 7 |
import torch
|
| 8 |
from transformers import CLIPTokenizer, CLIPTextModelWithProjection
|
|
|
|
| 9 |
|
| 10 |
HTML="""
|
| 11 |
<!DOCTYPE html>
|
|
@@ -55,10 +56,14 @@ ENDING = """For search acceleration capabilities, please refer to [Searchium.ai]
|
|
| 55 |
"""
|
| 56 |
|
| 57 |
|
| 58 |
-
DATA_PATH = './new_data'
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
#load database features:
|
| 64 |
ft_visual_features_database_bin = np.load(ft_visual_features_file_bin)
|
|
|
|
| 6 |
import faiss
|
| 7 |
import torch
|
| 8 |
from transformers import CLIPTokenizer, CLIPTextModelWithProjection
|
| 9 |
+
import huggingface_hub
|
| 10 |
|
| 11 |
HTML="""
|
| 12 |
<!DOCTYPE html>
|
|
|
|
| 56 |
"""
|
| 57 |
|
| 58 |
|
|
|
|
| 59 |
|
| 60 |
+
|
| 61 |
+
DATA_PATH = './cache'
|
| 62 |
+
|
| 63 |
+
huggingface_hub.hf_hub_download(repo_id="Searchium-ai/clip4clip-webvid150k", subfolder="new_data", repo_type="model", cache_dir=DATA_PATH)
|
| 64 |
+
|
| 65 |
+
ft_visual_features_file = DATA_PATH + '/new_data/video_half_dataset_visual_features.npy'
|
| 66 |
+
ft_visual_features_file_bin = DATA_PATH + '/new_data/video_half_dataset_visual_features_binary_packed.npy'
|
| 67 |
|
| 68 |
#load database features:
|
| 69 |
ft_visual_features_database_bin = np.load(ft_visual_features_file_bin)
|