Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,16 +20,16 @@ import numpy as np
|
|
20 |
#from sklearn.metrics import accuracy_score
|
21 |
|
22 |
|
23 |
-
|
24 |
#from keras.preprocessing import image
|
25 |
#from keras.applications.vgg16 import VGG16, preprocess_input
|
26 |
#import heapq
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
class_dict = {
|
35 |
'c0': 'hands on the wheel',
|
|
|
20 |
#from sklearn.metrics import accuracy_score
|
21 |
|
22 |
|
23 |
+
from keras.models import model_from_json
|
24 |
#from keras.preprocessing import image
|
25 |
#from keras.applications.vgg16 import VGG16, preprocess_input
|
26 |
#import heapq
|
27 |
|
28 |
+
file = open("focusondriving.json", 'r')
|
29 |
+
model_json2 = file.read()
|
30 |
+
file.close()
|
31 |
+
loaded_model = model_from_json(model_json2)
|
32 |
+
loaded_model.load_weights("focusondriving.h5")
|
33 |
|
34 |
class_dict = {
|
35 |
'c0': 'hands on the wheel',
|