Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,6 @@ def searchEmbeddings(id):
|
|
27 |
|
28 |
image_index = faiss.IndexFlatIP(dim)
|
29 |
|
30 |
-
# load dictionaries
|
31 |
-
with open("id_emb_dict.pickle", "rb") as f:
|
32 |
-
id_to_emb_dict = pickle.load(f)
|
33 |
-
with open("indx_to_id.pickle", "rb") as f:
|
34 |
-
indx_to_id_dict = pickle.load(f)
|
35 |
-
|
36 |
# get index
|
37 |
image_index = faiss.read_index("image_index.index")
|
38 |
|
@@ -86,6 +80,10 @@ with gr.Blocks() as demo:
|
|
86 |
dataset_image1 = pickle.load(f)
|
87 |
with open("dataset_image2.pickle", "rb") as f:
|
88 |
dataset_image2 = pickle.load(f)
|
|
|
|
|
|
|
|
|
89 |
|
90 |
with gr.Column():
|
91 |
process_id = gr.Textbox(label="ID:", info="Enter a sample ID to search for")
|
|
|
27 |
|
28 |
image_index = faiss.IndexFlatIP(dim)
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# get index
|
31 |
image_index = faiss.read_index("image_index.index")
|
32 |
|
|
|
80 |
dataset_image1 = pickle.load(f)
|
81 |
with open("dataset_image2.pickle", "rb") as f:
|
82 |
dataset_image2 = pickle.load(f)
|
83 |
+
with open("id_emb_dict.pickle", "rb") as f:
|
84 |
+
id_to_emb_dict = pickle.load(f)
|
85 |
+
with open("indx_to_id.pickle", "rb") as f:
|
86 |
+
indx_to_id_dict = pickle.load(f)
|
87 |
|
88 |
with gr.Column():
|
89 |
process_id = gr.Textbox(label="ID:", info="Enter a sample ID to search for")
|