Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def inference(img,task):
|
|
54 |
img = img.resize((width,height), Image.ANTIALIAS)
|
55 |
|
56 |
img.save("temp/image.jpg", "JPEG")
|
57 |
-
|
58 |
if task == 'Motion Deblurring':
|
59 |
task = 'Motion_Deblurring'
|
60 |
os.system("python demo.py --task 'Motion_Deblurring' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
@@ -70,11 +70,7 @@ def inference(img,task):
|
|
70 |
if task == 'Deraining':
|
71 |
os.system("python demo.py --task 'Deraining' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
72 |
|
73 |
-
|
74 |
-
restored = f'temp/{task}/image.png'
|
75 |
-
"""
|
76 |
-
restored = 'temp/image.jpg'
|
77 |
-
return restored
|
78 |
|
79 |
gr.Interface(
|
80 |
inference,
|
|
|
54 |
img = img.resize((width,height), Image.ANTIALIAS)
|
55 |
|
56 |
img.save("temp/image.jpg", "JPEG")
|
57 |
+
|
58 |
if task == 'Motion Deblurring':
|
59 |
task = 'Motion_Deblurring'
|
60 |
os.system("python demo.py --task 'Motion_Deblurring' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
|
|
70 |
if task == 'Deraining':
|
71 |
os.system("python demo.py --task 'Deraining' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
72 |
|
73 |
+
return f'temp/{task}/image.png'
|
|
|
|
|
|
|
|
|
74 |
|
75 |
gr.Interface(
|
76 |
inference,
|