Spaces:
Build error
Build error
Commit
·
5cab6f1
1
Parent(s):
2c222d2
app.py
Browse files
app.py
CHANGED
|
@@ -59,10 +59,10 @@ def predict(image_file, segmentation_png, bitmap_img):
|
|
| 59 |
# fake_image = tf.squeeze(model.predict([latent_vector, final_img_list[2]]), axis=0)
|
| 60 |
fake_image = model.predict([latent_vector, final_img_list[2]])
|
| 61 |
|
| 62 |
-
real_images = final_img_list
|
| 63 |
-
|
| 64 |
# return tf.squeeze(real_images[1], axis=0), fake_image
|
| 65 |
-
return
|
| 66 |
|
| 67 |
# input
|
| 68 |
input = [gr.inputs.Image(type="filepath", label="Ground Truth - Real Image (jpg)"),
|
|
@@ -83,7 +83,7 @@ examples = [["/content/facades_data/cmp_b0010.jpg", "/content/facades_data/cmp_b
|
|
| 83 |
["/content/facades_data/cmp_b0050.jpg", "/content/facades_data/cmp_b0050.png", "/content/facades_data/cmp_b0050.bmp"]]
|
| 84 |
|
| 85 |
# output
|
| 86 |
-
output = [gr.outputs.Image(type="
|
| 87 |
|
| 88 |
title = "GauGAN For Conditional Image Generation"
|
| 89 |
description = "Upload an Image or take one from examples to generate realistic images that are conditioned on cue images and segmentation maps"
|
|
|
|
| 59 |
# fake_image = tf.squeeze(model.predict([latent_vector, final_img_list[2]]), axis=0)
|
| 60 |
fake_image = model.predict([latent_vector, final_img_list[2]])
|
| 61 |
|
| 62 |
+
#real_images = final_img_list
|
| 63 |
+
fake = Image.fromarray((fake_image[0]+1)/2)
|
| 64 |
# return tf.squeeze(real_images[1], axis=0), fake_image
|
| 65 |
+
return fake
|
| 66 |
|
| 67 |
# input
|
| 68 |
input = [gr.inputs.Image(type="filepath", label="Ground Truth - Real Image (jpg)"),
|
|
|
|
| 83 |
["/content/facades_data/cmp_b0050.jpg", "/content/facades_data/cmp_b0050.png", "/content/facades_data/cmp_b0050.bmp"]]
|
| 84 |
|
| 85 |
# output
|
| 86 |
+
output = [gr.outputs.Image(type="pil", label="Generated - Conditioned Images")]
|
| 87 |
|
| 88 |
title = "GauGAN For Conditional Image Generation"
|
| 89 |
description = "Upload an Image or take one from examples to generate realistic images that are conditioned on cue images and segmentation maps"
|