aryrk commited on
Commit
7d9b835
·
1 Parent(s): 26e1c44

[fix error]

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -26,7 +26,7 @@ if not os.path.exists(expected_model_path):
26
 
27
  def reflection_removal(input_image):
28
  if not input_image.lower().endswith((".jpg", ".jpeg", ".png")):
29
- return "File is not supported (only .jpg, .jpeg, .png)."
30
 
31
  file_path = os.path.join(UPLOAD_DIR, os.path.basename(input_image))
32
  shutil.copy(input_image, file_path)
@@ -47,9 +47,10 @@ def reflection_removal(input_image):
47
  for file in files:
48
  if file.endswith("_fake.png"):
49
  result_path = os.path.join(root, file)
50
- return Image.open(result_path)
 
 
51
 
52
- return "No results found."
53
 
54
  def use_sample_image(sample_image_name):
55
  sample_image_path = os.path.join(SAMPLE_DIR, sample_image_name)
 
26
 
27
  def reflection_removal(input_image):
28
  if not input_image.lower().endswith((".jpg", ".jpeg", ".png")):
29
+ return ["File is not supported (only .jpg, .jpeg, .png)."]
30
 
31
  file_path = os.path.join(UPLOAD_DIR, os.path.basename(input_image))
32
  shutil.copy(input_image, file_path)
 
47
  for file in files:
48
  if file.endswith("_fake.png"):
49
  result_path = os.path.join(root, file)
50
+ return [Image.open(result_path)]
51
+
52
+ return ["No results found."]
53
 
 
54
 
55
  def use_sample_image(sample_image_name):
56
  sample_image_path = os.path.join(SAMPLE_DIR, sample_image_name)