Spaces:
Sleeping
Sleeping
[Update]Add slider
Browse files
app.py
CHANGED
|
@@ -74,15 +74,18 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 74 |
|
| 75 |
# start_button = gr.Button("Attack!")
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
with gr.Column():
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
start_button.click(fn=excute_udiff, inputs=[diffusion_model_id, concept, attacker], outputs=result, api_name="udiff")
|
| 86 |
|
| 87 |
|
| 88 |
# demo.queue(default_enabled=False, api_open=False, max_size=5).launch(debug=True, show_api=False)
|
|
|
|
| 74 |
|
| 75 |
# start_button = gr.Button("Attack!")
|
| 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"]
|
| 86 |
+
# ], inputs=[diffusion_model_id, concept, attacker])
|
| 87 |
|
| 88 |
+
# start_button.click(fn=excute_udiff, inputs=[diffusion_model_id, concept, attacker], outputs=result, api_name="udiff")
|
| 89 |
|
| 90 |
|
| 91 |
# demo.queue(default_enabled=False, api_open=False, max_size=5).launch(debug=True, show_api=False)
|