Julián Tachella commited on
Commit ·
7f74cd7
1
Parent(s): 1b64684
test
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import numpy as np
|
|
| 6 |
def pil_to_torch(image):
|
| 7 |
image = np.array(image)
|
| 8 |
image = image.transpose((2, 0, 1))
|
| 9 |
-
image = torch.tensor(image)
|
| 10 |
return image.unsqueeze(0)
|
| 11 |
|
| 12 |
def torch_to_pil(image):
|
|
@@ -23,10 +23,10 @@ def image_mod(image):
|
|
| 23 |
return torch_to_pil(noisy), torch_to_pil(estimated)
|
| 24 |
|
| 25 |
|
| 26 |
-
input_image = gr.
|
| 27 |
-
output_images = gr.
|
| 28 |
-
noise_image = gr.
|
| 29 |
-
input_image_output = gr.
|
| 30 |
|
| 31 |
|
| 32 |
demo = gr.Interface(
|
|
|
|
| 6 |
def pil_to_torch(image):
|
| 7 |
image = np.array(image)
|
| 8 |
image = image.transpose((2, 0, 1))
|
| 9 |
+
image = torch.tensor(image).float()
|
| 10 |
return image.unsqueeze(0)
|
| 11 |
|
| 12 |
def torch_to_pil(image):
|
|
|
|
| 23 |
return torch_to_pil(noisy), torch_to_pil(estimated)
|
| 24 |
|
| 25 |
|
| 26 |
+
input_image = gr.Image(label='Input Image')
|
| 27 |
+
output_images = gr.Image(label='Denoised Image')
|
| 28 |
+
noise_image = gr.Image(label='Noisy Image')
|
| 29 |
+
input_image_output = gr.Image(label='Input Image')
|
| 30 |
|
| 31 |
|
| 32 |
demo = gr.Interface(
|