Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -174,7 +174,7 @@ tag_model.to(device, dtype=weight_dtype)
|
|
| 174 |
|
| 175 |
def preprocess_image(input_image: Image.Image) -> Image.Image:
|
| 176 |
img = input_image.copy()
|
| 177 |
-
img.thumbnail((
|
| 178 |
return img
|
| 179 |
|
| 180 |
|
|
@@ -290,8 +290,7 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
| 290 |
</div>
|
| 291 |
"""
|
| 292 |
)
|
| 293 |
-
with gr.Row():
|
| 294 |
-
with gr.Column():
|
| 295 |
input_image = gr.Image(type="pil", height=256)
|
| 296 |
run_button = gr.Button("π Magnify 4x", variant="primary")
|
| 297 |
preprocessed_image = gr.Image(label="preprocessed image(256x256)", type="pil", interactive=False, height=256)
|
|
|
|
| 174 |
|
| 175 |
def preprocess_image(input_image: Image.Image) -> Image.Image:
|
| 176 |
img = input_image.copy()
|
| 177 |
+
img.thumbnail((512, 512), Image.Resampling.BILINEAR)
|
| 178 |
return img
|
| 179 |
|
| 180 |
|
|
|
|
| 290 |
</div>
|
| 291 |
"""
|
| 292 |
)
|
| 293 |
+
with gr.Row():
|
|
|
|
| 294 |
input_image = gr.Image(type="pil", height=256)
|
| 295 |
run_button = gr.Button("π Magnify 4x", variant="primary")
|
| 296 |
preprocessed_image = gr.Image(label="preprocessed image(256x256)", type="pil", interactive=False, height=256)
|