muskan19 commited on
Commit
02b1305
·
verified ·
1 Parent(s): 9f9536d

Upload predict.py

Browse files
Files changed (1) hide show
  1. src/predict.py +10 -0
src/predict.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # predict.py placeholder
2
+ from tensorflow.keras.models import load_model
3
+
4
+ def load_trained_model(path):
5
+ return load_model(path)
6
+
7
+ def predict_violence(model, processed_frame):
8
+ prediction = model.predict(processed_frame)
9
+ return prediction[0][0]
10
+