import gradio as gr with gr.Blocks() as demo: with gr.Row(): drop1 = gr.Dropdown(["Church", "Parachute", "Garbage"], label="Objects") drop2 = gr.Dropdown(["Van Gogh"], label="Styles") drop3 = gr.Dropdown(["Nudity", "Violence", "Illegal Activity"], label="Concepts") with gr.Row(): with gr.Column(scale=1, min_width=600): text1 = gr.Textbox(label="Attacking Prompt") inbtw = gr.Button("Add") text4 = gr.Textbox(label="Embedding") with gr.Row(): with gr.Column(scale=1, min_width=300): img1 = gr.Image("images/cheetah.jpg",label="Image") with gr.Column(scale=1, min_width=300): img2 = gr.Image("images/cheetah.jpg",label="After Defense") demo.launch()