Spaces:
Paused
Paused
Update app_gradio.py
Browse files- app_gradio.py +4 -3
app_gradio.py
CHANGED
@@ -166,7 +166,8 @@ def generate_output(image, apply_filter, prompt: str, num_seeds: int = 3, lambda
|
|
166 |
# Save the input image temporarily
|
167 |
temp_image_path = os.path.join(exp_dir, "temp_input.png")
|
168 |
|
169 |
-
image =
|
|
|
170 |
|
171 |
image.save(temp_image_path)
|
172 |
|
@@ -220,7 +221,7 @@ with gr.Blocks(css=css) as demo:
|
|
220 |
with gr.Column():
|
221 |
|
222 |
input_sketch = gr.Image(
|
223 |
-
type="
|
224 |
label="Selected Sketch",
|
225 |
scale=1,
|
226 |
interactive=True,
|
@@ -292,7 +293,7 @@ with gr.Blocks(css=css) as demo:
|
|
292 |
"layers": None,
|
293 |
"composite": None
|
294 |
},
|
295 |
-
type="
|
296 |
image_mode="RGB",
|
297 |
layers=False,
|
298 |
|
|
|
166 |
# Save the input image temporarily
|
167 |
temp_image_path = os.path.join(exp_dir, "temp_input.png")
|
168 |
|
169 |
+
image = Image.open(image)
|
170 |
+
image = image.resize((256, 256), Image.LANCZOS)
|
171 |
|
172 |
image.save(temp_image_path)
|
173 |
|
|
|
221 |
with gr.Column():
|
222 |
|
223 |
input_sketch = gr.Image(
|
224 |
+
type="filepath",
|
225 |
label="Selected Sketch",
|
226 |
scale=1,
|
227 |
interactive=True,
|
|
|
293 |
"layers": None,
|
294 |
"composite": None
|
295 |
},
|
296 |
+
type="filepath",
|
297 |
image_mode="RGB",
|
298 |
layers=False,
|
299 |
|