Aaron Vattay commited on
Commit
354e5ba
·
1 Parent(s): bbad24e
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ class UPSC(nn.Module):
24
  return self.model(x)
25
 
26
  model = UPSC().to(device)
27
- model.load_state_dict(torch.load("upscaling.pth", weights_only=True,map_location=device))
 
28
  model.eval()
29
 
30
  def task(img):
 
24
  return self.model(x)
25
 
26
  model = UPSC().to(device)
27
+ state = torch.load("upscaling.pth", weights_only=True,map_location=device)
28
+ model.load_state_dict(state)
29
  model.eval()
30
 
31
  def task(img):