animena3264 commited on
Commit
038ddfd
·
verified ·
1 Parent(s): 8848589

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -16
app.py DELETED
@@ -1,16 +0,0 @@
1
- import torch
2
- from PIL import Image
3
- import numpy as np
4
- from RealESRGAN import RealESRGAN
5
-
6
- device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
7
-
8
- model = RealESRGAN(device, scale=4)
9
- model.load_weights('weights/RealESRGAN_x4.pth', download=True)
10
-
11
- path_to_image = 'inputs/lr_image.png'
12
- image = Image.open(path_to_image).convert('RGB')
13
-
14
- sr_image = model.predict(image)
15
-
16
- sr_image.save('results/sr_image.png')