Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,59 +88,8 @@ with gr.Blocks(css=custom_css) as demo:
|
|
88 |
text_ouput = gr.Textbox(label="Prompt Genetated by UnlearnDiffAtk")
|
89 |
img2 = gr.Image("images/cheetah.jpg",label="Image Gnerated by Prompt of UnlearnDiffAtk",width=260,show_share_button=False,show_download_button=False)
|
90 |
|
91 |
-
# with gr.Column():
|
92 |
-
# gr.Examples(examples=[
|
93 |
-
# ["CompVis/stable-diffusion-v1-4", "nudity", "text_grad"]
|
94 |
-
# ], inputs=[diffusion_model_id, concept, attacker])
|
95 |
|
96 |
start_button.click(fn=excute_udiff, inputs=[drop_model, drop, shown_columns_step], outputs=[text_ouput], api_name="udiff")
|
97 |
|
98 |
|
99 |
-
|
100 |
-
demo.queue().launch(server_name='0.0.0.0',share=True)
|
101 |
-
|
102 |
-
# with gr.Blocks() as demo:
|
103 |
-
# with gr.Row():
|
104 |
-
# prompt = gr.Textbox(label='Input Prompt')
|
105 |
-
# with gr.Row():
|
106 |
-
# shown_columns_1 = gr.CheckboxGroup(
|
107 |
-
# choices=["Church","Parachute","Tench", "Garbage Truck"],
|
108 |
-
# label="Undersirable Objects",
|
109 |
-
# elem_id="column-object",
|
110 |
-
# interactive=True,
|
111 |
-
# )
|
112 |
-
# with gr.Row():
|
113 |
-
# shown_columns_2 = gr.CheckboxGroup(
|
114 |
-
# choices=["Van Gogh"],
|
115 |
-
# label="Undersirable Styles",
|
116 |
-
# elem_id="column-style",
|
117 |
-
# interactive=True,
|
118 |
-
# )
|
119 |
-
# with gr.Row():
|
120 |
-
# shown_columns_3 = gr.CheckboxGroup(
|
121 |
-
# choices=["Violence","Illegal Activity","Nudity"],
|
122 |
-
# label="Undersirable Concepts (Outputs that may be offensive in nature)",
|
123 |
-
# elem_id="column-select",
|
124 |
-
# interactive=True,
|
125 |
-
# )
|
126 |
-
# with gr.Row():
|
127 |
-
# with gr.Column(scale=1, min_width=300):
|
128 |
-
# img1 = gr.Image("images/cheetah.jpg",label="Unlearning")
|
129 |
-
# with gr.Column(scale=1, min_width=300):
|
130 |
-
# img2 = gr.Image("images/cheetah.jpg",label="Attacking")
|
131 |
-
|
132 |
-
# with gr.Row():
|
133 |
-
# # gr.Markdown("Please upload your model id.")
|
134 |
-
# diffusion_model_id = gr.Textbox(label='diffusion_model_id')
|
135 |
-
# shown_columns_4 = gr.Slider(
|
136 |
-
# 1, 100, value=40,
|
137 |
-
# step=1, label="Attacking Steps", info="Choose between 1 and 100",
|
138 |
-
# interactive=True,)
|
139 |
-
|
140 |
-
# # concept = gr.Textbox(label='concept')
|
141 |
-
# attacker = gr.Textbox(label='attacker')
|
142 |
-
|
143 |
-
# start_button = gr.Button("Attack!")
|
144 |
-
|
145 |
-
|
146 |
-
# demo.launch()
|
|
|
88 |
text_ouput = gr.Textbox(label="Prompt Genetated by UnlearnDiffAtk")
|
89 |
img2 = gr.Image("images/cheetah.jpg",label="Image Gnerated by Prompt of UnlearnDiffAtk",width=260,show_share_button=False,show_download_button=False)
|
90 |
|
|
|
|
|
|
|
|
|
91 |
|
92 |
start_button.click(fn=excute_udiff, inputs=[drop_model, drop, shown_columns_step], outputs=[text_ouput], api_name="udiff")
|
93 |
|
94 |
|
95 |
+
demo.queue().launch(server_name='0.0.0.0',share=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|