dzy7e commited on
Commit
7dd5168
1 Parent(s): f8d7eff
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  from attack import Attacker
3
  import argparse
4
 
5
-
6
  def do_attack(img, eps, step_size, steps, progress=gr.Progress()):
7
  args=argparse.Namespace()
8
  args.out_dir='./'
@@ -19,7 +18,7 @@ def do_attack(img, eps, step_size, steps, progress=gr.Progress()):
19
 
20
  attacker = Attacker(args, pgd_callback=pdg_prog)
21
  atk_img, noise = attacker.attack_(img)
22
- attacker.save_image(atk_img, noise, 'out.png')
23
  return 'out.png'
24
 
25
  with gr.Blocks(title="Anime AI Detect Fucker Demo", theme="dark") as demo:
 
2
  from attack import Attacker
3
  import argparse
4
 
 
5
  def do_attack(img, eps, step_size, steps, progress=gr.Progress()):
6
  args=argparse.Namespace()
7
  args.out_dir='./'
 
18
 
19
  attacker = Attacker(args, pgd_callback=pdg_prog)
20
  atk_img, noise = attacker.attack_(img)
21
+ attacker.save_image(img, noise, 'out.png')
22
  return 'out.png'
23
 
24
  with gr.Blocks(title="Anime AI Detect Fucker Demo", theme="dark") as demo: