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