Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -107,12 +107,12 @@ def predict(input_image:Image.Image, true_label:str):
|
|
107 |
}
|
108 |
return confidences, true_label, face_with_mask
|
109 |
|
110 |
-
title = "Deepfake Image Detection"
|
111 |
description = "~ AI - ML implementation for fake and real image detection..."
|
112 |
article = "<p style='text-align: center'>...</p>"
|
113 |
|
114 |
-
demo = gr.Interface(fn=image_classifier, inputs=gr.Image(type="pil"), outputs="label", title=title, description=description)
|
115 |
-
demo.launch(show_api=False)
|
116 |
|
117 |
interface = gr.Interface(
|
118 |
fn=predict,
|
@@ -126,6 +126,18 @@ interface = gr.Interface(
|
|
126 |
gr.outputs.Image(label="Face with Explainability", type="pil")
|
127 |
#ValueError: Invalid value for parameter `type`: auto. Please choose from one of: ['numpy', 'pil', 'filepath']
|
128 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
theme = gr.themes.Soft(),
|
131 |
title = title,
|
|
|
107 |
}
|
108 |
return confidences, true_label, face_with_mask
|
109 |
|
110 |
+
title = "Deepfake Image Detection & AI Art Detector"
|
111 |
description = "~ AI - ML implementation for fake and real image detection..."
|
112 |
article = "<p style='text-align: center'>...</p>"
|
113 |
|
114 |
+
#demo = gr.Interface(fn=image_classifier, inputs=gr.Image(type="pil"), outputs="label", title=title, description=description)
|
115 |
+
#demo.launch(show_api=False)
|
116 |
|
117 |
interface = gr.Interface(
|
118 |
fn=predict,
|
|
|
126 |
gr.outputs.Image(label="Face with Explainability", type="pil")
|
127 |
#ValueError: Invalid value for parameter `type`: auto. Please choose from one of: ['numpy', 'pil', 'filepath']
|
128 |
],
|
129 |
+
|
130 |
+
fn=image_classifier,
|
131 |
+
inputs=[
|
132 |
+
gr.inputs.Image(label="Input Image", type="pil"),
|
133 |
+
"text"
|
134 |
+
],
|
135 |
+
outputs=[
|
136 |
+
gr.outputs.Label(label="Is it Artificial or Human"),
|
137 |
+
"text",
|
138 |
+
#ValueError: Invalid value for parameter `type`: auto. Please choose from one of: ['numpy', 'pil', 'filepath']
|
139 |
+
],
|
140 |
+
|
141 |
|
142 |
theme = gr.themes.Soft(),
|
143 |
title = title,
|