Spaces:
Build error
Build error
parokshsaxena commited on
Commit ยท
0246478
1
Parent(s): 52a4bac
using image editor
Browse files151 unmodified lines152153154155156157158159143 unmodified lines3033043053063073083093103113123133143153163176 unmodified lines324325326327328329330331151 unmodified linespipe.to(device)pipe.unet_encoder.to(device)#human_img_orig = human_img_dict["background"].convert("RGB") # ImageEditorhuman_img_orig = human_img_dict.convert("RGB") # Image"""143 unmodified lineshuman_list_path = [os.path.join(example_path,"human",human) for human in human_list]human_ex_list = []human_ex_list = human_list_path # Image""" if using ImageEditor instead of Image while taking input, use this - ImageEditorfor ex_human in human_list_path:ex_dict= {}ex_dict['background'] = ex_humanex_dict['layers'] = Noneex_dict['composite'] = Nonehuman_ex_list.append(ex_dict)"""##default human6 unmodified lineswith gr.Column():# changing from ImageEditor to Image to allow easy passing of data through API# instead of passing {"dictionary": <>} ( which is failing ), we can directly pass the image#imgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)imgs = gr.Image(sources='upload', type='pil',label='Human. Mask with pen or use auto-masking')with gr.Row():is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)with gr.Row():151 unmodified lines152153154155156157158159143 unmodified lines3033043053063073083093103113123133143153163176 unmodified lines324325326327328329330331151 unmodified linespipe.to(device)pipe.unet_encoder.to(device)human_img_orig = human_img_dict["background"].convert("RGB") # ImageEditor#human_img_orig = human_img_dict.convert("RGB") # Image"""143 unmodified lineshuman_list_path = [os.path.join(example_path,"human",human) for human in human_list]human_ex_list = []#human_ex_list = human_list_path # Image#""" if using ImageEditor instead of Image while taking input, use this - ImageEditorfor ex_human in human_list_path:ex_dict= {}ex_dict['background'] = ex_humanex_dict['layers'] = Noneex_dict['composite'] = Nonehuman_ex_list.append(ex_dict)#"""##default human6 unmodified lineswith gr.Column():# changing from ImageEditor to Image to allow easy passing of data through API# instead of passing {"dictionary": <>} ( which is failing ), we can directly pass the imageimgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)#imgs = gr.Image(sources='upload', type='pil',label='Human. Mask with pen or use auto-masking')with gr.Row():is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)with gr.Row():
app.py+7-7