Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ zip_ref = zipfile.ZipFile(local_zip, 'r')
|
|
25 |
zip_ref.extractall('deepfakes-test-images')
|
26 |
zip_ref.close()
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
detector = MTCNN()
|
33 |
|
@@ -73,20 +73,19 @@ def deepfakespredict(select_model, input_img ):
|
|
73 |
title="EfficientNetV2 Deepfakes Image Detector"
|
74 |
description="This is a demo implementation of EfficientNetV2 Deepfakes Image Detector. To use it, simply upload your image, or click one of the examples to load them."
|
75 |
examples = [
|
76 |
-
|
77 |
['deepfakes-test-images/Fake-1.jpg'],
|
78 |
['deepfakes-test-images/Fake-2.jpg'],
|
79 |
['deepfakes-test-images/Fake-3.jpg'],
|
80 |
['deepfakes-test-images/Fake-4.jpg'],
|
81 |
-
['deepfakes-test-images/Fake-5.jpg']
|
82 |
-
|
83 |
-
[
|
84 |
['deepfakes-test-images/Real-1.jpg'],
|
85 |
['deepfakes-test-images/Real-2.jpg'],
|
86 |
['deepfakes-test-images/Real-3.jpg'],
|
87 |
['deepfakes-test-images/Real-4.jpg'],
|
88 |
-
['deepfakes-test-images/Real-5.jpg']
|
89 |
-
|
90 |
]
|
91 |
|
92 |
gr.Interface(deepfakespredict,
|
|
|
25 |
zip_ref.extractall('deepfakes-test-images')
|
26 |
zip_ref.close()
|
27 |
|
28 |
+
|
29 |
+
model_b0 = tf.keras.models.load_model("FINAL-EFFICIENTNETV2-B0")
|
30 |
+
model_s = tf.keras.models.load_model("FINAL-EFFICIENTNETV2-S")
|
31 |
|
32 |
detector = MTCNN()
|
33 |
|
|
|
73 |
title="EfficientNetV2 Deepfakes Image Detector"
|
74 |
description="This is a demo implementation of EfficientNetV2 Deepfakes Image Detector. To use it, simply upload your image, or click one of the examples to load them."
|
75 |
examples = [
|
76 |
+
|
77 |
['deepfakes-test-images/Fake-1.jpg'],
|
78 |
['deepfakes-test-images/Fake-2.jpg'],
|
79 |
['deepfakes-test-images/Fake-3.jpg'],
|
80 |
['deepfakes-test-images/Fake-4.jpg'],
|
81 |
+
['deepfakes-test-images/Fake-5.jpg'],
|
82 |
+
|
|
|
83 |
['deepfakes-test-images/Real-1.jpg'],
|
84 |
['deepfakes-test-images/Real-2.jpg'],
|
85 |
['deepfakes-test-images/Real-3.jpg'],
|
86 |
['deepfakes-test-images/Real-4.jpg'],
|
87 |
+
['deepfakes-test-images/Real-5.jpg']
|
88 |
+
|
89 |
]
|
90 |
|
91 |
gr.Interface(deepfakespredict,
|