Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,16 +151,17 @@ def main(image, backbone, style):
|
|
| 151 |
isize = image.size
|
| 152 |
image = process(image, transformer)
|
| 153 |
s = f"The output image {str(image.size)} is processed by {backbone} based on input image {str(isize)}. <br> Please <b>rate</b> the generated image through the <b>Flag</b> button below!"
|
|
|
|
| 154 |
return image, s
|
| 155 |
|
| 156 |
-
|
| 157 |
gr.Interface(
|
| 158 |
title = "Stylize",
|
| 159 |
description = "Image generated based on Fast Style Transfer",
|
| 160 |
fn = main,
|
| 161 |
inputs = [
|
| 162 |
gr.inputs.Image(),
|
| 163 |
-
gr.inputs.Radio(["
|
| 164 |
gr.inputs.Dropdown(["The Scream", "Rain Princess", "Starry Night", "The Mosaic"], type="value", default="Rain Princess", label="style")
|
| 165 |
],
|
| 166 |
outputs = [gr.outputs.Image(label="Stylized"), gr.outputs.HTML(label="Comment")],
|
|
|
|
| 151 |
isize = image.size
|
| 152 |
image = process(image, transformer)
|
| 153 |
s = f"The output image {str(image.size)} is processed by {backbone} based on input image {str(isize)}. <br> Please <b>rate</b> the generated image through the <b>Flag</b> button below!"
|
| 154 |
+
print(s)
|
| 155 |
return image, s
|
| 156 |
|
| 157 |
+
# "Standard ResNet50"οΌ "VGG19"
|
| 158 |
gr.Interface(
|
| 159 |
title = "Stylize",
|
| 160 |
description = "Image generated based on Fast Style Transfer",
|
| 161 |
fn = main,
|
| 162 |
inputs = [
|
| 163 |
gr.inputs.Image(),
|
| 164 |
+
gr.inputs.Radio(["Robust ResNet50"], label="Backbone"),
|
| 165 |
gr.inputs.Dropdown(["The Scream", "Rain Princess", "Starry Night", "The Mosaic"], type="value", default="Rain Princess", label="style")
|
| 166 |
],
|
| 167 |
outputs = [gr.outputs.Image(label="Stylized"), gr.outputs.HTML(label="Comment")],
|