Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def main(params):
|
|
81 |
if np.isnan(avg_prediction):
|
82 |
raise ValueError("Average prediction is NaN, indicating an issue with the predictions.")
|
83 |
|
84 |
-
result = '
|
85 |
confidence = float(avg_prediction) * 100 # Convert numpy float to Python float and scale
|
86 |
print(result,float("{:.2f}".format(confidence))*100)
|
87 |
# Prepare the result as a JSON response
|
|
|
81 |
if np.isnan(avg_prediction):
|
82 |
raise ValueError("Average prediction is NaN, indicating an issue with the predictions.")
|
83 |
|
84 |
+
result = 'Deepfake' if avg_prediction > 0.86 else 'Real'
|
85 |
confidence = float(avg_prediction) * 100 # Convert numpy float to Python float and scale
|
86 |
print(result,float("{:.2f}".format(confidence))*100)
|
87 |
# Prepare the result as a JSON response
|