Spaces:
Runtime error
Runtime error
Update fawkes_wrapper_gradio_v_1_0.py
Browse files
fawkes_wrapper_gradio_v_1_0.py
CHANGED
@@ -10,9 +10,9 @@ PREPROCESS = 'raw'
|
|
10 |
class FawkesProtection:
|
11 |
def __init__(self):
|
12 |
# Initialize Fawkes instances for different protection levels
|
13 |
-
self.fwks_l = Fawkes("extractor_2",
|
14 |
-
self.fwks_m = Fawkes("extractor_2",
|
15 |
-
self.fwks_h = Fawkes("extractor_2",
|
16 |
|
17 |
def generate_cloak_images(self, protector, image_X, target_emb=None):
|
18 |
cloaked_image_X = protector.compute(image_X, target_emb)
|
|
|
10 |
class FawkesProtection:
|
11 |
def __init__(self):
|
12 |
# Initialize Fawkes instances for different protection levels
|
13 |
+
self.fwks_l = Fawkes("extractor_2", 1, mode='low')
|
14 |
+
self.fwks_m = Fawkes("extractor_2", 1, mode='mid')
|
15 |
+
self.fwks_h = Fawkes("extractor_2", 1, mode='high')
|
16 |
|
17 |
def generate_cloak_images(self, protector, image_X, target_emb=None):
|
18 |
cloaked_image_X = protector.compute(image_X, target_emb)
|