Spaces:
Runtime error
Runtime error
chuxiaojie
commited on
Commit
·
f6bc9ab
1
Parent(s):
37357a8
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ os.system("python3 setup.py develop --no_cuda_ext --user")
|
|
11 |
def inference(image, task):
|
12 |
if not os.path.exists('tmp'):
|
13 |
os.system('mkdir tmp')
|
14 |
-
image.save("tmp/
|
15 |
|
16 |
if task == 'Denoising':
|
17 |
-
os.system("python basicsr/demo.py -opt options/test/SIDD/NAFNet-width64.yml --input_path ./tmp/
|
18 |
|
19 |
if task == 'Deblurring':
|
20 |
-
os.system("python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./tmp/
|
21 |
|
22 |
return 'tmp/image.png'
|
23 |
|
|
|
11 |
def inference(image, task):
|
12 |
if not os.path.exists('tmp'):
|
13 |
os.system('mkdir tmp')
|
14 |
+
image.save("tmp/lq_image.png", "PNG")
|
15 |
|
16 |
if task == 'Denoising':
|
17 |
+
os.system("python basicsr/demo.py -opt options/test/SIDD/NAFNet-width64.yml --input_path ./tmp/lq_image.png --output_path ./tmp/image.png")
|
18 |
|
19 |
if task == 'Deblurring':
|
20 |
+
os.system("python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./tmp/lq_image.png --output_path ./tmp/image.png")
|
21 |
|
22 |
return 'tmp/image.png'
|
23 |
|