Spaces:
Running
Running
yizhangliu
commited on
Commit
•
f3f61d9
1
Parent(s):
384748d
Update app.py
Browse files
app.py
CHANGED
@@ -355,11 +355,11 @@ def predict(input):
|
|
355 |
print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
|
356 |
# mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
|
357 |
'''
|
358 |
-
output = model_process(input) # dict["image"], dict["mask"])
|
359 |
|
360 |
# output = mask #output.images[0]
|
361 |
# output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
|
362 |
-
|
363 |
return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
364 |
|
365 |
print(f'liuyz_500_here_')
|
@@ -452,7 +452,7 @@ with image_blocks as demo:
|
|
452 |
with gr.Box():
|
453 |
with gr.Row():
|
454 |
with gr.Column():
|
455 |
-
image = gr.Image(source='upload', tool='sketch',
|
456 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
457 |
# prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
|
458 |
btn = gr.Button("Done!").style(
|
|
|
355 |
print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
|
356 |
# mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
|
357 |
'''
|
358 |
+
# output = model_process(input) # dict["image"], dict["mask"])
|
359 |
|
360 |
# output = mask #output.images[0]
|
361 |
# output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
|
362 |
+
output = input["mask"]
|
363 |
return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
364 |
|
365 |
print(f'liuyz_500_here_')
|
|
|
452 |
with gr.Box():
|
453 |
with gr.Row():
|
454 |
with gr.Column():
|
455 |
+
image = gr.Image(source='upload', tool='sketch',label="Upload").style(height=512)
|
456 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
457 |
# prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
|
458 |
btn = gr.Button("Done!").style(
|