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()