Spaces:
Sleeping
Sleeping
nuevo modelo h5
Browse files- app.py +17 -17
- face_classifier_model.h5 +1 -1
app.py
CHANGED
|
@@ -27,23 +27,23 @@ classifier_model.compile(loss=tf.keras.losses.SparseCategoricalCrossentropy(),
|
|
| 27 |
optimizer='nadam',
|
| 28 |
metrics=['accuracy'])
|
| 29 |
|
| 30 |
-
person_rep
|
| 31 |
-
1: '
|
| 32 |
-
2: '
|
| 33 |
-
3: '
|
| 34 |
-
4: '
|
| 35 |
-
5: '
|
| 36 |
-
6: '
|
| 37 |
-
7: '
|
| 38 |
-
8: '
|
| 39 |
-
9: '
|
| 40 |
-
10: '
|
| 41 |
-
11: '
|
| 42 |
-
12: '
|
| 43 |
-
13: '
|
| 44 |
-
14: '
|
| 45 |
-
15: '
|
| 46 |
-
16: '
|
| 47 |
|
| 48 |
def predict_image(image_path):
|
| 49 |
img = load_img(image_path, target_size=(224, 224))
|
|
|
|
| 27 |
optimizer='nadam',
|
| 28 |
metrics=['accuracy'])
|
| 29 |
|
| 30 |
+
person_rep={0: 'DenzelWashington',
|
| 31 |
+
1: 'AngelinaJolie',
|
| 32 |
+
2: 'KateWinslet',
|
| 33 |
+
3: 'HughJackman',
|
| 34 |
+
4: 'ScarlettJohansson',
|
| 35 |
+
5: 'JenniferLawrence',
|
| 36 |
+
6: 'NicoleKidman',
|
| 37 |
+
7: 'SandraBullock',
|
| 38 |
+
8: 'LeonardoDiCaprio',
|
| 39 |
+
9: 'MeganFox',
|
| 40 |
+
10: 'WillSmith',
|
| 41 |
+
11: 'TomCruise',
|
| 42 |
+
12: 'BradPitt',
|
| 43 |
+
13: 'NataliePortman',
|
| 44 |
+
14: 'TomHanks',
|
| 45 |
+
15: 'JohnnyDepp',
|
| 46 |
+
16: 'RobertDowneyJr'}
|
| 47 |
|
| 48 |
def predict_image(image_path):
|
| 49 |
img = load_img(image_path, target_size=(224, 224))
|
face_classifier_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3219008
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fd6ffcd4f98f5074cad8adcaa7e7897885f65ff5f446ab368d834098d3639a1
|
| 3 |
size 3219008
|