SHREYSH commited on
Commit
45a6ca3
·
verified ·
1 Parent(s): ede5a9d

Update fawkes_wrapper_gradio_v_1_0.py

Browse files
Files changed (1) hide show
  1. fawkes_wrapper_gradio_v_1_0.py +5 -3
fawkes_wrapper_gradio_v_1_0.py CHANGED
@@ -21,9 +21,11 @@ PREPROCESS = 'raw'
21
  class FawkesProtection:
22
  def __init__(self):
23
  # Initialize Fawkes instances for different protection levels
24
- self.fwks_l = Fawkes("extractor_2", '0', 1, mode='low')
25
- self.fwks_m = Fawkes("extractor_2", '0', 1, mode='mid')
26
- self.fwks_h = Fawkes("extractor_2", '0', 1, mode='high')
 
 
27
 
28
  def generate_cloak_images(self, protector, image_X, target_emb=None):
29
  cloaked_image_X = protector.compute(image_X, target_emb)
 
21
  class FawkesProtection:
22
  def __init__(self):
23
  # Initialize Fawkes instances for different protection levels
24
+ self.fwks_l = Fawkes("extractor_2", '0', 1, protection_mode='low')
25
+ self.fwks_m = Fawkes("extractor_2", '0', 1, protection_mode='mid')
26
+ self.fwks_h = Fawkes("extractor_2", '0', 1, protection_mode='high')
27
+
28
+ # Rest of the code remains the same
29
 
30
  def generate_cloak_images(self, protector, image_X, target_emb=None):
31
  cloaked_image_X = protector.compute(image_X, target_emb)