AlexZou commited on
Commit
a6bdd34
1 Parent(s): 2316bc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -7,22 +7,22 @@ def inference(image, task):
7
  image.save("tmp/lq_image.png", "PNG")
8
 
9
  if task == 'Dehazing':
10
- os.system("python Dehazing.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/Haze4k.tjm")
11
 
12
  if task == 'LLIE':
13
- os.system("python Lowlight.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/Low.onnx")
14
 
15
  if task == 'SuperResolutionx2':
16
- os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/SRx2.pth --scale 2")
17
 
18
  if task == 'SuperResolutionx3':
19
- os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/SRx3.pth --scale 3")
20
 
21
  if task == 'SuperResolutionx4':
22
- os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/SRx4.pth --scale 4")
23
 
24
- if task == 'Underwater Enhancement':
25
- os.system("python Underwater.py --test_path ./tmp/lq_image.png --save_path ./results/ --pk_path model_zoo/underwater.pth")
26
 
27
  return 'results/output.png'
28
 
 
7
  image.save("tmp/lq_image.png", "PNG")
8
 
9
  if task == 'Dehazing':
10
+ os.system("python Dehazing.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/Haze4k.tjm")
11
 
12
  if task == 'LLIE':
13
+ os.system("python Lowlight.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/Low.onnx")
14
 
15
  if task == 'SuperResolutionx2':
16
+ os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/SRx2.pth --scale 2")
17
 
18
  if task == 'SuperResolutionx3':
19
+ os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/SRx3.pth --scale 3")
20
 
21
  if task == 'SuperResolutionx4':
22
+ os.system("python SuperResolution.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/SRx4.pth --scale 4")
23
 
24
+ if task == 'Underwater':
25
+ os.system("python Underwater.py --test_path ./tmp/lq_image.png --save_path ./tmp/ --pk_path model_zoo/underwater.pth")
26
 
27
  return 'results/output.png'
28