justin-shopcapsule
commited on
Commit
•
83ec49b
1
Parent(s):
2eef253
Update handler.py
Browse filesremove to device call, since it is already a parameter
- handler.py +1 -1
handler.py
CHANGED
@@ -19,7 +19,7 @@ from RealESRGAN import RealESRGAN
|
|
19 |
class EndpointHandler():
|
20 |
def __init__(self, path="."):
|
21 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
-
self.model = RealESRGAN(self.device, scale=4)
|
23 |
self.model.load_weights('/repository/RealESRGAN_x4.pth', download=True)
|
24 |
|
25 |
|
|
|
19 |
class EndpointHandler():
|
20 |
def __init__(self, path="."):
|
21 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
+
self.model = RealESRGAN(self.device, scale=4)
|
23 |
self.model.load_weights('/repository/RealESRGAN_x4.pth', download=True)
|
24 |
|
25 |
|