Spaces:
Build error
Build error
renamed dataset path
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def load_labels():
|
|
57 |
:return:
|
58 |
"""
|
59 |
|
60 |
-
with open("
|
61 |
classes = load_classes(csv.reader(f, delimiter=','))
|
62 |
|
63 |
labels = {}
|
@@ -188,7 +188,6 @@ st.sidebar.title("Face Mask Detection")
|
|
188 |
# Models drive ids
|
189 |
ids = {
|
190 |
'resnet50_20': st.secrets['resnet50'],
|
191 |
-
# 'resnet50_29': '1E_IOIuE5OpO4tQgTbXjdAmXR-9BCxxmT',
|
192 |
'resnet152_20': st.secrets['resnet152'],
|
193 |
}
|
194 |
|
@@ -211,7 +210,7 @@ index = st.number_input('', min_value=0, max_value=852, value=495, help='Choose
|
|
211 |
left, right = st.columns([3, 1])
|
212 |
|
213 |
# Get corresponding image and transform it
|
214 |
-
image = cv2.imread(f'
|
215 |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
216 |
|
217 |
# Process img
|
|
|
57 |
:return:
|
58 |
"""
|
59 |
|
60 |
+
with open("data/labels.csv", 'r') as f:
|
61 |
classes = load_classes(csv.reader(f, delimiter=','))
|
62 |
|
63 |
labels = {}
|
|
|
188 |
# Models drive ids
|
189 |
ids = {
|
190 |
'resnet50_20': st.secrets['resnet50'],
|
|
|
191 |
'resnet152_20': st.secrets['resnet152'],
|
192 |
}
|
193 |
|
|
|
210 |
left, right = st.columns([3, 1])
|
211 |
|
212 |
# Get corresponding image and transform it
|
213 |
+
image = cv2.imread(f'data/validation/image/maksssksksss{str(index)}.jpg')
|
214 |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
215 |
|
216 |
# Process img
|