Spaces:
Runtime error
Runtime error
NotRealAI
commited on
Commit
β’
a97a9cc
1
Parent(s):
19d5322
Updates
Browse files- app.py +19 -6
- images/fake0.jpg +0 -0
- images/fake1.png +0 -0
- images/real0.jpg +0 -0
- images/real1.jpg +0 -0
- requirements.txt +4 -0
app.py
CHANGED
@@ -27,9 +27,22 @@ def inference(img, ver):
|
|
27 |
out = face2paint(model1, img)
|
28 |
return out
|
29 |
|
30 |
-
title = "
|
31 |
-
description = "
|
32 |
-
article = "<p style='text-align: center'><a href='https://github.com/
|
33 |
-
examples=[
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
out = face2paint(model1, img)
|
28 |
return out
|
29 |
|
30 |
+
title = "Deepfake Detection"
|
31 |
+
description = "This gradio contains a GAN-generated image detector developed to distinguish real images from synthetic ones."
|
32 |
+
article = "<p style='text-align: center'><a href='https://github.com/polimi-ispl/GAN-image-detection' target='_blank'>@polimi-ispl/GAN-image-detection</a></p>"
|
33 |
+
examples=[
|
34 |
+
['images/fake0.jpg','Fake Female'],
|
35 |
+
['images/fake1.png','Fake Male'],
|
36 |
+
['images/real0.jpg','Real Female'],
|
37 |
+
['images/real1.jpg','Real Male'],
|
38 |
+
|
39 |
+
gr.Interface(inference,
|
40 |
+
gr.inputs.Image(type="pil"),
|
41 |
+
gr.outputs.Image(type="pil"),
|
42 |
+
title=title,
|
43 |
+
description=description,
|
44 |
+
article=article,
|
45 |
+
examples=examples,
|
46 |
+
allow_flagging=False,
|
47 |
+
allow_screenshot=False
|
48 |
+
).launch(enable_queue=True,cache_examples=True)
|
images/fake0.jpg
ADDED
![]() |
images/fake1.png
ADDED
![]() |
images/real0.jpg
ADDED
![]() |
images/real1.jpg
ADDED
![]() |
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
torchvision
|
3 |
+
Pillow
|
4 |
+
tqdm
|