Spaces:
Sleeping
Sleeping
aryrk
commited on
Commit
·
26e1c44
1
Parent(s):
8b5cf1f
[fix error]
Browse files
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.
|
| 29 |
-
return "
|
| 30 |
|
| 31 |
-
file_path = os.path.join(UPLOAD_DIR, os.path.basename(input_image
|
| 32 |
-
shutil.copy(input_image
|
| 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",
|