Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,27 +15,27 @@ import os
|
|
15 |
#zip_ref.extractall('FINAL-EFFICIENTNETV2-B0')
|
16 |
#zip_ref.close()
|
17 |
|
18 |
-
import h5py
|
19 |
|
20 |
# ุงูุชุญ ู
ูู ุงููู
ูุฐุฌ H5
|
21 |
-
h5_file = h5py.File('model_cp.h5', 'r')
|
22 |
|
23 |
# ูุฑุงุกุฉ ุงูู
ุญุชูู
|
24 |
# ูู
ููู ุงุณุชูุดุงู ุงูู
ุญุชูู ุจุงุณุชุฎุฏุงู
ุงูุฃูุงู
ุฑ ุงูุชุงููุฉ
|
25 |
-
print(h5_file.keys()) # ูุงุฆู
ุฉ ุงูู
ูุงุชูุญ ูู ุงูู
ูู
|
26 |
-
print(h5_file['
|
27 |
|
28 |
# ุฅูุดุงุก ู
ูู HDF5 ุฌุฏูุฏ
|
29 |
-
hdf5_file = h5py.File('model.hdf5', 'w')
|
30 |
|
31 |
# ูุณุฎ ุงูู
ุญุชูู ู
ู ู
ูู ุงููู
ูุฐุฌ H5 ุฅูู ุงูู
ูู ุงูุฌุฏูุฏ
|
32 |
-
h5_file.copy('model_weights', hdf5_file)
|
33 |
|
34 |
# ุฅุบูุงู ุงูู
ููุงุช
|
35 |
-
h5_file.close()
|
36 |
-
hdf5_file.close()
|
37 |
|
38 |
-
model = tf.keras.models.load_model('
|
39 |
|
40 |
detector = MTCNN()
|
41 |
|
|
|
15 |
#zip_ref.extractall('FINAL-EFFICIENTNETV2-B0')
|
16 |
#zip_ref.close()
|
17 |
|
18 |
+
#import h5py
|
19 |
|
20 |
# ุงูุชุญ ู
ูู ุงููู
ูุฐุฌ H5
|
21 |
+
#h5_file = h5py.File('model_cp.h5', 'r')
|
22 |
|
23 |
# ูุฑุงุกุฉ ุงูู
ุญุชูู
|
24 |
# ูู
ููู ุงุณุชูุดุงู ุงูู
ุญุชูู ุจุงุณุชุฎุฏุงู
ุงูุฃูุงู
ุฑ ุงูุชุงููุฉ
|
25 |
+
#print(h5_file.keys()) # ูุงุฆู
ุฉ ุงูู
ูุงุชูุญ ูู ุงูู
ูู
|
26 |
+
#print(h5_file['tf_lite_model.tflite'].keys()) # ูุงุฆู
ุฉ ุงูู
ูุงุชูุญ ูู ู
ุฌู
ูุนุฉ ุงูุฃูุฒุงู
|
27 |
|
28 |
# ุฅูุดุงุก ู
ูู HDF5 ุฌุฏูุฏ
|
29 |
+
#hdf5_file = h5py.File('model.hdf5', 'w')
|
30 |
|
31 |
# ูุณุฎ ุงูู
ุญุชูู ู
ู ู
ูู ุงููู
ูุฐุฌ H5 ุฅูู ุงูู
ูู ุงูุฌุฏูุฏ
|
32 |
+
#h5_file.copy('model_weights', hdf5_file)
|
33 |
|
34 |
# ุฅุบูุงู ุงูู
ููุงุช
|
35 |
+
#h5_file.close()
|
36 |
+
#hdf5_file.close()
|
37 |
|
38 |
+
model = tf.keras.models.load_model('tf_lite_model.tflite')
|
39 |
|
40 |
detector = MTCNN()
|
41 |
|