Update app.py
Browse files
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("
|
11 |
-
os.mkdir("
|
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")
|