chuxiaojie commited on
Commit
25da2a5
1 Parent(s): abe72ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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('temp'):
14
- os.system('mkdir temp')
15
- image.save("temp/image.png", "PNG")
16
 
17
  if task == 'Denoising':
18
- os.system("python basicsr/demo.py -opt options/test/SIDD/NAFNet-width64.yml --input_path ./temp/image.png --output_path ./temp/image.png")
19
 
20
  if task == 'Deblurring':
21
- os.system("python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./temp/image.png --output_path ./temp/image.png")
22
 
23
- return f'temp/{task}/image.jpg'
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"