Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def excute_udiff(diffusion_model_id, concept, attacker):
|
|
20 |
result = requests.post('http://{}:{}/udiff'.format(myip, myport), json={"diffusion_model_id": diffusion_model_id, "concept": concept, "attacker": attacker})
|
21 |
result = result.text[1:-1]
|
22 |
|
23 |
-
return
|
24 |
|
25 |
|
26 |
css = '''
|
@@ -48,7 +48,7 @@ with gr.Blocks(css=css) as demo:
|
|
48 |
start_button = gr.Button("Attack!")
|
49 |
|
50 |
with gr.Column():
|
51 |
-
result = gr.Textbox(label="
|
52 |
|
53 |
with gr.Column():
|
54 |
gr.Examples(examples=[
|
|
|
20 |
result = requests.post('http://{}:{}/udiff'.format(myip, myport), json={"diffusion_model_id": diffusion_model_id, "concept": concept, "attacker": attacker})
|
21 |
result = result.text[1:-1]
|
22 |
|
23 |
+
return result
|
24 |
|
25 |
|
26 |
css = '''
|
|
|
48 |
start_button = gr.Button("Attack!")
|
49 |
|
50 |
with gr.Column():
|
51 |
+
result = gr.Textbox(label="unsafe prompt")
|
52 |
|
53 |
with gr.Column():
|
54 |
gr.Examples(examples=[
|