Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,10 +41,10 @@ def inference(img, task, run_on):
|
|
41 |
img = img.resize((width,height), Image.ANTIALIAS)
|
42 |
|
43 |
#parameters = {'inp_channels':3, 'out_channels':3, 'dim':48, 'num_blocks':[4,6,6,8], 'num_refinement_blocks':4, 'heads':[1,2,4,8], 'ffn_expansion_factor':2.66, 'bias':False, 'LayerNorm_type':'WithBias', 'dual_pixel_task':False}
|
44 |
-
|
45 |
-
model.load_state_dict(
|
46 |
#model.eval()
|
47 |
-
|
48 |
|
49 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
50 |
model = model.to(device)
|
|
|
41 |
img = img.resize((width,height), Image.ANTIALIAS)
|
42 |
|
43 |
#parameters = {'inp_channels':3, 'out_channels':3, 'dim':48, 'num_blocks':[4,6,6,8], 'num_refinement_blocks':4, 'heads':[1,2,4,8], 'ffn_expansion_factor':2.66, 'bias':False, 'LayerNorm_type':'WithBias', 'dual_pixel_task':False}
|
44 |
+
#checkpoint = torch.load('deshabby.pt')
|
45 |
+
#model.load_state_dict(checkpoint['params'])
|
46 |
#model.eval()
|
47 |
+
model = torch.jit.load('deshabby.pt')
|
48 |
|
49 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
50 |
model = model.to(device)
|