givkashi commited on
Commit
6fba779
1 Parent(s): 1185034

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -7,14 +7,17 @@ os.system("pip install opencv-python")
7
 
8
  if not os.path.exists("data"):
9
  os.mkdir("data")
10
- if not os.path.exists("dataout"):
11
- os.mkdir("dataout")
12
 
13
 
14
  # os.rename("003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth", "experiments/pretrained_models/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth")
15
  def infer(img):
16
  #img = ImageOps.contain(img, (700, 700))
17
  width, height = img.size
 
 
 
18
  img.save("./data/data.png")
19
  os.system('python main_test_swinir.py')
20
  res=Image.open("./results/data.png")
 
7
 
8
  if not os.path.exists("data"):
9
  os.mkdir("data")
10
+ if not os.path.exists("results"):
11
+ os.mkdir("results")
12
 
13
 
14
  # os.rename("003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth", "experiments/pretrained_models/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth")
15
  def infer(img):
16
  #img = ImageOps.contain(img, (700, 700))
17
  width, height = img.size
18
+ res=np.ones_like(imag.shape)
19
+ print(img.shape)
20
+ print(width)
21
  img.save("./data/data.png")
22
  os.system('python main_test_swinir.py')
23
  res=Image.open("./results/data.png")