xinchen9 commited on
Commit
c08838c
1 Parent(s): a9eb656

[Update]Add attack section

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -76,10 +76,19 @@ with gr.Blocks(css=custom_css) as demo:
76
 
77
  with gr.Column():
78
  shown_columns_step = gr.Slider(
79
- 1, 100, value=40,
80
- step=1, label="Attack Steps", info="Choose between 1 and 100",
81
  interactive=True,)
82
-
 
 
 
 
 
 
 
 
 
83
  # with gr.Column():
84
  # gr.Examples(examples=[
85
  # ["CompVis/stable-diffusion-v1-4", "nudity", "text_grad"]
 
76
 
77
  with gr.Column():
78
  shown_columns_step = gr.Slider(
79
+ 0, 100, value=40,
80
+ step=1, label="Attack Steps", info="Choose between 0 and 100",
81
  interactive=True,)
82
+ with gr.Row() as attack:
83
+ with gr.Column(scale=1, min_width=260):
84
+ text_input = gr.Textbox(label="Input Prompt")
85
+ img1 = gr.Image("images/cheetah.jpg",label="Image")
86
+ with gr.Column(scale=1, max_width=60):
87
+ start_button = gr.Button("UnlearnDiffAtk!")
88
+ with gr.Column(scale=1, min_width=260):
89
+ text_ouput = gr.Textbox(label="Prompt Genetated by UnlearnDiffAtk")
90
+ img2 = gr.Image("images/cheetah.jpg",label="After Defense")
91
+
92
  # with gr.Column():
93
  # gr.Examples(examples=[
94
  # ["CompVis/stable-diffusion-v1-4", "nudity", "text_grad"]