Vivien Chappelier commited on
Commit
4188365
1 Parent(s): 2e03ce3

let's try this

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -121,14 +121,14 @@ def interface():
121
  with gr.Row():
122
  btn1 = gr.Button("Generate")
123
  with gr.Row():
124
- watermarked_image = gr.Image(type="pil")#.style(width=512, height=512)
125
  with gr.Column():
126
  downscale = gr.Slider(1, 3, value=1, step=0.1, label="Downscale ratio")
127
  saturation = gr.Slider(0, 2, value=1, step=0.1, label="Color saturation")
128
  jpeg_compression = gr.Slider(value=100, step=5, label="JPEG quality")
129
  btn2 = gr.Button("Attack & Detect")
130
  with gr.Row():
131
- attacked_image = gr.Image(type="pil", tool="select")#.style(width=256)
132
  detection_label = gr.Label(label="Detection info")
133
  btn1.click(fn=backend.generate, inputs=[mode, seed, inp], outputs=[watermarked_image], api_name="generate")
134
  btn2.click(fn=backend.attack_detect, inputs=[watermarked_image, jpeg_compression, downscale, saturation], outputs=[attacked_image, detection_label], api_name="detect")
 
121
  with gr.Row():
122
  btn1 = gr.Button("Generate")
123
  with gr.Row():
124
+ watermarked_image = gr.Image(type="pil", width=512, height=512)
125
  with gr.Column():
126
  downscale = gr.Slider(1, 3, value=1, step=0.1, label="Downscale ratio")
127
  saturation = gr.Slider(0, 2, value=1, step=0.1, label="Color saturation")
128
  jpeg_compression = gr.Slider(value=100, step=5, label="JPEG quality")
129
  btn2 = gr.Button("Attack & Detect")
130
  with gr.Row():
131
+ attacked_image = gr.Image(type="pil", width=256)
132
  detection_label = gr.Label(label="Detection info")
133
  btn1.click(fn=backend.generate, inputs=[mode, seed, inp], outputs=[watermarked_image], api_name="generate")
134
  btn2.click(fn=backend.attack_detect, inputs=[watermarked_image, jpeg_compression, downscale, saturation], outputs=[attacked_image, detection_label], api_name="detect")