Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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 |
|