Spaces:
Runtime error
Runtime error
Commit
·
e190334
1
Parent(s):
df8017d
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,8 @@ def process_image(raw_image,prompt):
|
|
89 |
|
90 |
return [(init_image,"Source Image"), (adv_image, "Adv Image"), (image_nat,"Gen. Image Nat"), (image_adv, "Gen. Image Adv")]
|
91 |
|
92 |
-
|
|
|
93 |
|
94 |
interface = gr.Interface(fn=process_image,
|
95 |
inputs=[gr.Image(type="pil"), gr.Textbox(label="Prompt")],
|
@@ -97,7 +98,9 @@ interface = gr.Interface(fn=process_image,
|
|
97 |
label="Generated images", show_label=False, elem_id="gallery"
|
98 |
).style(grid=[2], height="auto")
|
99 |
],
|
100 |
-
title=title
|
|
|
|
|
101 |
)
|
102 |
|
103 |
interface.launch(debug=True)
|
|
|
89 |
|
90 |
return [(init_image,"Source Image"), (adv_image, "Adv Image"), (image_nat,"Gen. Image Nat"), (image_adv, "Gen. Image Adv")]
|
91 |
|
92 |
+
description = "This is an unofficial demo for Photoguard, which is an approach to safe-guarding images against manipulation by ML-powerd photo-editing models such as stable diffusion through immunization of images. The demo is based on the <a href='https://github.com/MadryLab/photoguard' style='text-decoration: underline;' target='_blank'> Github </a> implementation provided by the authors."
|
93 |
+
examples = [["dog.png", "dog under heavy rain and muddy ground real"]]
|
94 |
|
95 |
interface = gr.Interface(fn=process_image,
|
96 |
inputs=[gr.Image(type="pil"), gr.Textbox(label="Prompt")],
|
|
|
98 |
label="Generated images", show_label=False, elem_id="gallery"
|
99 |
).style(grid=[2], height="auto")
|
100 |
],
|
101 |
+
title=title,
|
102 |
+
description = description,
|
103 |
+
examples = examples
|
104 |
)
|
105 |
|
106 |
interface.launch(debug=True)
|