Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -126,15 +126,15 @@ with gr.Blocks(css=custom_css) as demo:
|
|
126 |
step=1, label="Attack Steps", info="Choose between 0 and 100",
|
127 |
interactive=True,)
|
128 |
with gr.Row() as attack:
|
129 |
-
with gr.Column(min_width=
|
130 |
start_button = gr.Button("Attack prepare!",size='lg')
|
131 |
text_input = gr.Textbox(label="Input Prompt")
|
132 |
|
133 |
-
orig_img = gr.Image(label="Image Generated by Input Prompt",width=
|
134 |
-
with gr.Column():
|
135 |
attack_button = gr.Button("UnlearnDiffAtk!",size='lg')
|
136 |
text_ouput = gr.Textbox(label="Prompt Genetated by UnlearnDiffAtk")
|
137 |
-
result_img = gr.Image(label="Image Gnerated by Prompt of UnlearnDiffAtk",width=
|
138 |
|
139 |
start_button.click(fn=execute_prepare, inputs=[drop_model, drop, shown_columns_step, atk_idx], outputs=[text_input, orig_img], api_name="prepare")
|
140 |
attack_button.click(fn=execute_udiff, inputs=[drop_model, drop, shown_columns_step, atk_idx], outputs=[text_ouput, result_img], api_name="udiff")
|
|
|
126 |
step=1, label="Attack Steps", info="Choose between 0 and 100",
|
127 |
interactive=True,)
|
128 |
with gr.Row() as attack:
|
129 |
+
with gr.Column(min_width=256):
|
130 |
start_button = gr.Button("Attack prepare!",size='lg')
|
131 |
text_input = gr.Textbox(label="Input Prompt")
|
132 |
|
133 |
+
orig_img = gr.Image(label="Image Generated by Input Prompt",width=256,show_share_button=False,show_download_button=False)
|
134 |
+
with gr.Column(min_width=256):
|
135 |
attack_button = gr.Button("UnlearnDiffAtk!",size='lg')
|
136 |
text_ouput = gr.Textbox(label="Prompt Genetated by UnlearnDiffAtk")
|
137 |
+
result_img = gr.Image(label="Image Gnerated by Prompt of UnlearnDiffAtk",width=256,show_share_button=False,show_download_button=False)
|
138 |
|
139 |
start_button.click(fn=execute_prepare, inputs=[drop_model, drop, shown_columns_step, atk_idx], outputs=[text_input, orig_img], api_name="prepare")
|
140 |
attack_button.click(fn=execute_udiff, inputs=[drop_model, drop, shown_columns_step, atk_idx], outputs=[text_ouput, result_img], api_name="udiff")
|