Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -110,6 +110,9 @@ class ImageTransform:
|
|
110 |
img = self.transform[phase](img)
|
111 |
return img
|
112 |
|
|
|
|
|
|
|
113 |
path = hf_hub_download('huggan/NeonGAN', 'model.bin')
|
114 |
model_gen_n = torch.load(path, map_location=torch.device('cpu'))
|
115 |
|
@@ -123,6 +126,8 @@ outputs = [
|
|
123 |
gr.outputs.Image(type="pil", label="Neon Image")
|
124 |
]
|
125 |
|
|
|
|
|
126 |
def get_output_image(img):
|
127 |
|
128 |
img = transform(img, phase='test')
|
@@ -144,6 +149,9 @@ gr.Interface(
|
|
144 |
get_output_image,
|
145 |
inputs,
|
146 |
outputs,
|
|
|
|
|
|
|
147 |
theme="huggingface",
|
148 |
).launch(enable_queue=True)
|
149 |
|
|
|
110 |
img = self.transform[phase](img)
|
111 |
return img
|
112 |
|
113 |
+
description = "When life is boring, add a bit of neon to it and enjoy the futuristic dreamy look to your images."
|
114 |
+
title = "Generate Futuristic images with NeonGAN"
|
115 |
+
|
116 |
path = hf_hub_download('huggan/NeonGAN', 'model.bin')
|
117 |
model_gen_n = torch.load(path, map_location=torch.device('cpu'))
|
118 |
|
|
|
126 |
gr.outputs.Image(type="pil", label="Neon Image")
|
127 |
]
|
128 |
|
129 |
+
examples = [['img_1.jpg'],['img_2.jpg']]
|
130 |
+
|
131 |
def get_output_image(img):
|
132 |
|
133 |
img = transform(img, phase='test')
|
|
|
149 |
get_output_image,
|
150 |
inputs,
|
151 |
outputs,
|
152 |
+
examples = examples,
|
153 |
+
title=title,
|
154 |
+
description=description,
|
155 |
theme="huggingface",
|
156 |
).launch(enable_queue=True)
|
157 |
|