Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ import gradio as gr
|
|
5 |
|
6 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
7 |
model2 = RealESRGAN(device, scale=2)
|
8 |
-
model2.load_weights('RealESRGAN_x2.pth', download=True)
|
9 |
model4 = RealESRGAN(device, scale=4)
|
10 |
-
model4.load_weights('RealESRGAN_x4.pth', download=True)
|
11 |
model8 = RealESRGAN(device, scale=8)
|
12 |
-
model8.load_weights('RealESRGAN_x8.pth', download=True)
|
13 |
|
14 |
|
15 |
def inference(image, size):
|
|
|
5 |
|
6 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
7 |
model2 = RealESRGAN(device, scale=2)
|
8 |
+
model2.load_weights('weights/RealESRGAN_x2.pth', download=True)
|
9 |
model4 = RealESRGAN(device, scale=4)
|
10 |
+
model4.load_weights('weights/RealESRGAN_x4.pth', download=True)
|
11 |
model8 = RealESRGAN(device, scale=8)
|
12 |
+
model8.load_weights('weights/RealESRGAN_x8.pth', download=True)
|
13 |
|
14 |
|
15 |
def inference(image, size):
|