Spaces:
Build error
Build error
pablorodriper
commited on
Commit
•
8061319
1
Parent(s):
cd58651
Update predict.py
Browse files- predict.py +3 -3
predict.py
CHANGED
@@ -6,12 +6,12 @@ from tensorflow.keras.optimizers import Adam
|
|
6 |
|
7 |
from constants import LEARNING_RATE
|
8 |
|
|
|
9 |
|
10 |
def predict_label(path):
|
11 |
frames = load_video(path)
|
12 |
-
|
13 |
-
|
14 |
-
label = np.argmax(pred, axis=0)
|
15 |
|
16 |
return label
|
17 |
|
|
|
6 |
|
7 |
from constants import LEARNING_RATE
|
8 |
|
9 |
+
model = get_model()
|
10 |
|
11 |
def predict_label(path):
|
12 |
frames = load_video(path)
|
13 |
+
prediction = model.predict(tf.expand_dims(frames, axis=0))[0]
|
14 |
+
label = np.argmax(prediction, axis=0)
|
|
|
15 |
|
16 |
return label
|
17 |
|