aryrk commited on
Commit
26e1c44
·
1 Parent(s): 8b5cf1f

[fix error]

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -25,11 +25,11 @@ if not os.path.exists(expected_model_path):
25
  copyfile(model_path, expected_model_path)
26
 
27
  def reflection_removal(input_image):
28
- if not input_image.name.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.name))
32
- shutil.copy(input_image.name, file_path)
33
 
34
  cmd = [
35
  "python", "test.py",
 
25
  copyfile(model_path, 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)
33
 
34
  cmd = [
35
  "python", "test.py",