Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def inference(img):
|
|
| 32 |
|
| 33 |
# 'Downsampled Image'
|
| 34 |
#### Resize the longer edge of the input image
|
| 35 |
-
max_res =
|
| 36 |
width, height = img.size
|
| 37 |
if max(width,height) > max_res:
|
| 38 |
scale = max_res /max(width,height)
|
|
@@ -45,7 +45,7 @@ def inference(img):
|
|
| 45 |
load_arch = run_path('restormer_arch.py')
|
| 46 |
model = load_arch['Restormer'](**parameters)
|
| 47 |
|
| 48 |
-
checkpoint = torch.load('
|
| 49 |
model.load_state_dict(checkpoint['params'])
|
| 50 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 51 |
model = model.to(device)
|
|
|
|
| 32 |
|
| 33 |
# 'Downsampled Image'
|
| 34 |
#### Resize the longer edge of the input image
|
| 35 |
+
max_res = 200
|
| 36 |
width, height = img.size
|
| 37 |
if max(width,height) > max_res:
|
| 38 |
scale = max_res /max(width,height)
|
|
|
|
| 45 |
load_arch = run_path('restormer_arch.py')
|
| 46 |
model = load_arch['Restormer'](**parameters)
|
| 47 |
|
| 48 |
+
checkpoint = torch.load('net_g_92000.pth')
|
| 49 |
model.load_state_dict(checkpoint['params'])
|
| 50 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 51 |
model = model.to(device)
|