Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,9 @@ from sklearn.neighbors import NearestNeighbors
|
|
13 |
feature_list = pickle.load(open('embeddings2.pkl', 'rb'))
|
14 |
filenames = pickle.load(open('filenames2.pkl', 'rb'))
|
15 |
|
|
|
|
|
|
|
16 |
model = ResNet50(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
|
17 |
model.trainable = False
|
18 |
|
|
|
13 |
feature_list = pickle.load(open('embeddings2.pkl', 'rb'))
|
14 |
filenames = pickle.load(open('filenames2.pkl', 'rb'))
|
15 |
|
16 |
+
# Normalize paths if necessary (optional redundancy check)
|
17 |
+
filenames = [filename.replace('\\', '/') for filename in filenames]
|
18 |
+
|
19 |
model = ResNet50(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
|
20 |
model.trainable = False
|
21 |
|