Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update similarity.py
Browse files- similarity.py +1 -0
similarity.py
CHANGED
@@ -15,6 +15,7 @@ from PIL import Image
|
|
15 |
from io import BytesIO
|
16 |
|
17 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
18 |
|
19 |
def preprocess_image_for_mobilenet(image):
|
20 |
if len(image.shape) == 2:
|
|
|
15 |
from io import BytesIO
|
16 |
|
17 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
18 |
+
mobilenet = MobileNetV2(weights="imagenet", include_top=False, pooling='avg')
|
19 |
|
20 |
def preprocess_image_for_mobilenet(image):
|
21 |
if len(image.shape) == 2:
|