Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ from pytorch_grad_cam import GradCAM
|
|
11 |
from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget
|
12 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
13 |
|
14 |
-
gr.themes.Soft()
|
15 |
-
gr.themes.builder()
|
16 |
|
17 |
with zipfile.ZipFile("examples.zip","r") as zip_ref:
|
18 |
zip_ref.extractall(".")
|
@@ -94,7 +94,7 @@ def predict(input_image:Image.Image, true_label:str):
|
|
94 |
|
95 |
title = "Deepfake Image Detection"
|
96 |
description = "~ AI - ML implementation for fake and real image detection technics."
|
97 |
-
article = "<p style='text-align: center'
|
98 |
|
99 |
interface = gr.Interface(
|
100 |
fn=predict,
|
@@ -103,10 +103,11 @@ interface = gr.Interface(
|
|
103 |
#"text"
|
104 |
],
|
105 |
outputs=[
|
106 |
-
gr.outputs.Label(label="Prediction Model - Fake or Real image detection")
|
107 |
#"text",
|
108 |
gr.outputs.Image(label="Explainability")
|
109 |
],
|
|
|
110 |
title = title,
|
111 |
description = description,
|
112 |
article = article
|
|
|
11 |
from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget
|
12 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
13 |
|
14 |
+
#gr.themes.Soft()
|
15 |
+
#gr.themes.builder()
|
16 |
|
17 |
with zipfile.ZipFile("examples.zip","r") as zip_ref:
|
18 |
zip_ref.extractall(".")
|
|
|
94 |
|
95 |
title = "Deepfake Image Detection"
|
96 |
description = "~ AI - ML implementation for fake and real image detection technics."
|
97 |
+
article = "<p style='text-align: center'>by Dushyantsinh Jadeja</p>"
|
98 |
|
99 |
interface = gr.Interface(
|
100 |
fn=predict,
|
|
|
103 |
#"text"
|
104 |
],
|
105 |
outputs=[
|
106 |
+
gr.outputs.Label(label="Prediction Model - % of Fake or Real image detection"),
|
107 |
#"text",
|
108 |
gr.outputs.Image(label="Explainability")
|
109 |
],
|
110 |
+
theme = gr.themes.Soft(),
|
111 |
title = title,
|
112 |
description = description,
|
113 |
article = article
|