Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,8 @@ class GOSNormalize(object):
|
|
53 |
transform = transforms.Compose([GOSNormalize([0.5,0.5,0.5],[1.0,1.0,1.0])])
|
54 |
|
55 |
def load_image(im_path, hypar):
|
56 |
-
|
|
|
57 |
im, im_shp = im_preprocess(im, hypar["cache_size"])
|
58 |
im = torch.divide(im,255.0)
|
59 |
shape = torch.from_numpy(np.array(im_shp))
|
|
|
53 |
transform = transforms.Compose([GOSNormalize([0.5,0.5,0.5],[1.0,1.0,1.0])])
|
54 |
|
55 |
def load_image(im_path, hypar):
|
56 |
+
im_path = BytesIO(requests.get(im_path).content)
|
57 |
+
im = im_reader(im_path)
|
58 |
im, im_shp = im_preprocess(im, hypar["cache_size"])
|
59 |
im = torch.divide(im,255.0)
|
60 |
shape = torch.from_numpy(np.array(im_shp))
|