cmahima commited on
Commit
b1fbb3c
1 Parent(s): 83d8d4f

new changes

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -255,7 +255,7 @@ def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_ste
255
  # Function to handle image selection from the gallery
256
  def select_image(images, evt: gr.SelectData):
257
  print(images)
258
- return images[evt.index]['name']
259
 
260
  garm_list = os.listdir(os.path.join(example_path,"cloth"))
261
  garm_list_path = [os.path.join(example_path,"cloth",garm) for garm in garm_list]
@@ -277,8 +277,9 @@ for ex_human in human_list_path:
277
 
278
  image_blocks = gr.Blocks(theme=gr.themes.Soft()).queue()
279
  with image_blocks as demo:
280
- gr.HTML("<center><h1>Virtual Try-On Demo based on IDM-VTON</h1></center>")
281
- gr.HTML("<center><p>Upload an image of a person and an image of a garment ✨</p></center>")
 
282
  with gr.Row():
283
  with gr.Column():
284
  imgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)
 
255
  # Function to handle image selection from the gallery
256
  def select_image(images, evt: gr.SelectData):
257
  print(images)
258
+ return images[evt.index][0]
259
 
260
  garm_list = os.listdir(os.path.join(example_path,"cloth"))
261
  garm_list_path = [os.path.join(example_path,"cloth",garm) for garm in garm_list]
 
277
 
278
  image_blocks = gr.Blocks(theme=gr.themes.Soft()).queue()
279
  with image_blocks as demo:
280
+ gr.HTML("<center><h1>Shop with Window</h1></center>")
281
+ gr.HTML("<center><p>Upload an image of yourself or select from examples ✨</p></center>")
282
+
283
  with gr.Row():
284
  with gr.Column():
285
  imgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)