SHREYSH commited on
Commit
e831ee2
1 Parent(s): 8f32b9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,9 +6,10 @@ from concurrent.futures import ThreadPoolExecutor
6
 
7
  fawkes_protection = FawkesProtection()
8
 
9
- def process_images(images, protection_level):
 
10
  with ThreadPoolExecutor() as executor:
11
- futures = [executor.submit(fawkes_protection.predict, img, level=protection_level) for img in images]
12
  results = [Image.fromarray(future.result()) for future in futures]
13
  return results
14
 
 
6
 
7
  fawkes_protection = FawkesProtection()
8
 
9
+ def process_images(image_files, protection_level):
10
+ images = [Image.open(file) for file in image_files]
11
  with ThreadPoolExecutor() as executor:
12
+ futures = [executor.submit(fawkes_protection.predict, img, protection_level) for img in images]
13
  results = [Image.fromarray(future.result()) for future in futures]
14
  return results
15