Spaces:
Sleeping
Sleeping
File size: 1,632 Bytes
4a11192 ed0812d a8b571f 3f4c365 ed0812d 867be7f ed0812d 867be7f 9907c33 8d45efd bd78932 8d45efd bd78932 4a11192 f6a1585 fa074eb f6a1585 4a11192 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
import gradio as gr
with gr.Blocks() as demo:
with gr.Row():
prompt = gr.Textbox(label='Input Prompt')
with gr.Row():
shown_columns_1 = gr.CheckboxGroup(
choices=["Church","Parachute","Tench", "Garbage Truck"],
label="Undersirable Objects",
elem_id="column-object",
interactive=True,
)
with gr.Row():
shown_columns_2 = gr.CheckboxGroup(
choices=["Van Gogh"],
label="Undersirable Styles",
elem_id="column-style",
interactive=True,
)
with gr.Row():
shown_columns_3 = gr.CheckboxGroup(
choices=["Violence","Illegal Activity","Nudity"],
label="Undersirable Concepts (Outputs that may be offensive in nature)",
elem_id="column-select",
interactive=True,
)
with gr.Row():
with gr.Column(scale=1, min_width=300):
img1 = gr.Image("images/cheetah.jpg",label="Unlearning")
with gr.Column(scale=1, min_width=300):
img2 = gr.Image("images/cheetah.jpg",label="Attacking")
with gr.Row():
# gr.Markdown("Please upload your model id.")
diffusion_model_id = gr.Textbox(label='diffusion_model_id')
shown_columns_4 = gr.Slider(
1, 100, value=40,
step=1, label="Attacking Steps", info="Choose between 1 and 100",
interactive=True,)
# concept = gr.Textbox(label='concept')
attacker = gr.Textbox(label='attacker')
start_button = gr.Button("Attack!")
demo.launch() |