Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def pil_to_binary_mask(pil_image, threshold=0):
|
|
| 40 |
return output_mask
|
| 41 |
|
| 42 |
|
| 43 |
-
base_path = '
|
| 44 |
example_path = os.path.join(os.path.dirname(__file__), 'example')
|
| 45 |
|
| 46 |
unet = UNet2DConditionModel.from_pretrained(
|
|
@@ -258,10 +258,8 @@ for ex_human in human_list_path:
|
|
| 258 |
##default human
|
| 259 |
|
| 260 |
|
| 261 |
-
image_blocks = gr.Blocks(
|
| 262 |
with image_blocks as demo:
|
| 263 |
-
gr.HTML("<center><h1>Virtual Try-On</h1></center>")
|
| 264 |
-
gr.HTML("<center><p>Upload an image of a person and an image of a garment ✨</p></center>")
|
| 265 |
with gr.Row():
|
| 266 |
with gr.Column():
|
| 267 |
imgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)
|
|
|
|
| 40 |
return output_mask
|
| 41 |
|
| 42 |
|
| 43 |
+
base_path = 'InvincibleMeta/Meta-Tryon''
|
| 44 |
example_path = os.path.join(os.path.dirname(__file__), 'example')
|
| 45 |
|
| 46 |
unet = UNet2DConditionModel.from_pretrained(
|
|
|
|
| 258 |
##default human
|
| 259 |
|
| 260 |
|
| 261 |
+
image_blocks = gr.Blocks().queue()
|
| 262 |
with image_blocks as demo:
|
|
|
|
|
|
|
| 263 |
with gr.Row():
|
| 264 |
with gr.Column():
|
| 265 |
imgs = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)
|