Spaces:
Sleeping
Sleeping
Updating paths
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ with open('image_embeddings.pkl', 'rb') as f:
|
|
61 |
f = pickle.load(f)
|
62 |
image_embeddings = f['embeddings']
|
63 |
image_names = f['image_paths']
|
64 |
-
image_paths = 'dataset'
|
65 |
|
66 |
def cosine_similarity(a, b):
|
67 |
a = a / np.linalg.norm(a, axis=-1, keepdims=True)
|
@@ -84,4 +84,4 @@ imgs_output = gr.Gallery(label="Top 4 most similar images")
|
|
84 |
|
85 |
intf = gr.Interface(fn=find_similar_images, inputs=text_input, outputs=imgs_output)
|
86 |
|
87 |
-
intf.launch(share=True, allowed_paths = '/teamspace/studios/this_studio/Animals_Recognition')
|
|
|
61 |
f = pickle.load(f)
|
62 |
image_embeddings = f['embeddings']
|
63 |
image_names = f['image_paths']
|
64 |
+
image_paths = './dataset'
|
65 |
|
66 |
def cosine_similarity(a, b):
|
67 |
a = a / np.linalg.norm(a, axis=-1, keepdims=True)
|
|
|
84 |
|
85 |
intf = gr.Interface(fn=find_similar_images, inputs=text_input, outputs=imgs_output)
|
86 |
|
87 |
+
intf.launch(share=True, allowed_paths = ['/teamspace/studios/this_studio/Animals_Recognition'])
|