Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
import os
|
2 |
import shutil
|
3 |
import torch
|
4 |
-
from natsort import natsorted
|
5 |
-
from glob import glob
|
6 |
import cv2
|
7 |
-
import numpy as np
|
8 |
import gradio as gr
|
9 |
from PIL import Image
|
10 |
|
@@ -57,18 +54,18 @@ def inference(img,task):
|
|
57 |
|
58 |
if task == 'Motion Deblurring':
|
59 |
task = 'Motion_Deblurring'
|
60 |
-
os.system("python
|
61 |
|
62 |
if task == 'Defocus Deblurring':
|
63 |
task = 'Single_Image_Defocus_Deblurring'
|
64 |
-
os.system("python
|
65 |
|
66 |
if task == 'Denoising':
|
67 |
task = 'Real_Denoising'
|
68 |
-
os.system("python
|
69 |
|
70 |
if task == 'Deraining':
|
71 |
-
os.system("python
|
72 |
|
73 |
return f'temp/{task}/image.png'
|
74 |
|
|
|
1 |
import os
|
2 |
import shutil
|
3 |
import torch
|
|
|
|
|
4 |
import cv2
|
|
|
5 |
import gradio as gr
|
6 |
from PIL import Image
|
7 |
|
|
|
54 |
|
55 |
if task == 'Motion Deblurring':
|
56 |
task = 'Motion_Deblurring'
|
57 |
+
os.system("python demo_gradio.py --task 'Motion_Deblurring' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
58 |
|
59 |
if task == 'Defocus Deblurring':
|
60 |
task = 'Single_Image_Defocus_Deblurring'
|
61 |
+
os.system("python demo_gradio.py --task 'Single_Image_Defocus_Deblurring' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
62 |
|
63 |
if task == 'Denoising':
|
64 |
task = 'Real_Denoising'
|
65 |
+
os.system("python demo_gradio.py --task 'Real_Denoising' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
66 |
|
67 |
if task == 'Deraining':
|
68 |
+
os.system("python demo_gradio.py --task 'Deraining' --input_dir './temp/image.jpg' --result_dir './temp/'")
|
69 |
|
70 |
return f'temp/{task}/image.png'
|
71 |
|