Spaces:
Running
Running
yizhangliu
commited on
Commit
•
e995f9f
1
Parent(s):
aa43f64
Update app.py
Browse files
app.py
CHANGED
@@ -362,11 +362,12 @@ def predict(input):
|
|
362 |
print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
|
363 |
# mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
|
364 |
'''
|
365 |
-
output = model_process(input) # dict["image"], dict["mask"])
|
366 |
|
367 |
# output = mask #output.images[0]
|
368 |
# output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
|
369 |
# output = input["mask"]
|
|
|
370 |
return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
371 |
|
372 |
print(f'liuyz_500_here_')
|
@@ -459,7 +460,7 @@ with image_blocks as demo:
|
|
459 |
with gr.Box():
|
460 |
with gr.Row():
|
461 |
with gr.Column():
|
462 |
-
image = gr.Image(source='upload', tool='sketch',label="Upload").style(height=512)
|
463 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
464 |
# prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
|
465 |
btn = gr.Button("Done!").style(
|
|
|
362 |
print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
|
363 |
# mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
|
364 |
'''
|
365 |
+
# output = model_process(input) # dict["image"], dict["mask"])
|
366 |
|
367 |
# output = mask #output.images[0]
|
368 |
# output = pipe(prompt = prompt, image=init_image, mask_image=mask,guidance_scale=7.5)
|
369 |
# output = input["mask"]
|
370 |
+
output = None
|
371 |
return output #, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
372 |
|
373 |
print(f'liuyz_500_here_')
|
|
|
460 |
with gr.Box():
|
461 |
with gr.Row():
|
462 |
with gr.Column():
|
463 |
+
image = gr.Image(source='upload', tool='sketch',type='filepath', label="Upload").style(height=512)
|
464 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
465 |
# prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
|
466 |
btn = gr.Button("Done!").style(
|