NickKolok commited on
Commit
22250a9
·
verified ·
1 Parent(s): 4cce72f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -22,8 +22,7 @@ if not os.path.exists(MODEL_PATH):
22
  # Define the Real-ESRGAN class
23
  class RealESRGAN:
24
  def __init__(self, model_path, device):
25
- # Correctly load the model
26
- self.model = torch.hub.load('xinntao/Real-ESRGAN', 'real_esrgan', model_path, device=device)
27
  self.model.eval() # Set the model to eval mode
28
  self.device = device # Store the device
29
 
 
22
  # Define the Real-ESRGAN class
23
  class RealESRGAN:
24
  def __init__(self, model_path, device):
25
+ self.model = torch.hub.load('xinntao/Real-ESRGAN', 'real_esrgan', model_path, device=device, trust_repo=True)
 
26
  self.model.eval() # Set the model to eval mode
27
  self.device = device # Store the device
28