Spaces:
Sleeping
Sleeping
Julián Tachella
commited on
Commit
·
f3af5c1
1
Parent(s):
dbb94b0
test
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def pil_to_torch(image):
|
|
15 |
def torch_to_pil(image):
|
16 |
image = image.squeeze(0).cpu().detach().numpy()
|
17 |
image = image.transpose((1, 2, 0))
|
18 |
-
image = (
|
19 |
image = PIL.Image.fromarray(image)
|
20 |
return image
|
21 |
|
|
|
15 |
def torch_to_pil(image):
|
16 |
image = image.squeeze(0).cpu().detach().numpy()
|
17 |
image = image.transpose((1, 2, 0))
|
18 |
+
image = (image * 255).astype(np.uint8)
|
19 |
image = PIL.Image.fromarray(image)
|
20 |
return image
|
21 |
|