SD_Defense / app.py
xinchen9's picture
Update app.py
282e9c7 verified
raw
history blame
771 Bytes
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()