Spaces:
Sleeping
Sleeping
ksvmuralidhar
commited on
Commit
•
d927e44
1
Parent(s):
7301ba2
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ from requests import get
|
|
11 |
from shutil import rmtree
|
12 |
import streamlit as st
|
13 |
import zipfile
|
14 |
-
|
15 |
|
16 |
# unzip vegetable images
|
17 |
def unzip_images():
|
18 |
with zipfile.ZipFile("Vegetable Images.zip", 'r') as zip_ref:
|
19 |
zip_ref.extractall('.')
|
20 |
-
|
21 |
|
22 |
if not os.path.exists('Vegetable Images/'):
|
23 |
unzip_images()
|
@@ -38,6 +38,7 @@ class ImageVectorizer:
|
|
38 |
top = model.get_layer('block5_pool').output
|
39 |
top = GlobalAveragePooling2D()(top)
|
40 |
model = Model(inputs=model.input, outputs=top)
|
|
|
41 |
return model
|
42 |
|
43 |
def vectorize(self, img_path: str):
|
|
|
11 |
from shutil import rmtree
|
12 |
import streamlit as st
|
13 |
import zipfile
|
14 |
+
|
15 |
|
16 |
# unzip vegetable images
|
17 |
def unzip_images():
|
18 |
with zipfile.ZipFile("Vegetable Images.zip", 'r') as zip_ref:
|
19 |
zip_ref.extractall('.')
|
20 |
+
print('unzipped images')
|
21 |
|
22 |
if not os.path.exists('Vegetable Images/'):
|
23 |
unzip_images()
|
|
|
38 |
top = model.get_layer('block5_pool').output
|
39 |
top = GlobalAveragePooling2D()(top)
|
40 |
model = Model(inputs=model.input, outputs=top)
|
41 |
+
print('loaded model')
|
42 |
return model
|
43 |
|
44 |
def vectorize(self, img_path: str):
|