Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -82,9 +82,14 @@ def predict_video(input_video):
|
|
82 |
confidences.append(prediction)
|
83 |
|
84 |
cap.release()
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
86 |
# Determine the final prediction based on the maximum occurrence of predictions
|
87 |
-
final_prediction = max(set(confidences), key=confidences.count)
|
88 |
|
89 |
return final_prediction, frames
|
90 |
|
|
|
82 |
confidences.append(prediction)
|
83 |
|
84 |
cap.release()
|
85 |
+
list=[]
|
86 |
+
list.append(set(confidences))
|
87 |
+
if( 'fake' in list):
|
88 |
+
final_prediction='fake'
|
89 |
+
else:
|
90 |
+
final_prediction='real'
|
91 |
# Determine the final prediction based on the maximum occurrence of predictions
|
92 |
+
# final_prediction = max(set(confidences), key=confidences.count)
|
93 |
|
94 |
return final_prediction, frames
|
95 |
|