Spaces:
Sleeping
Sleeping
Commit
·
615de65
1
Parent(s):
bcf59c3
names changes
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ import gradio as gr
|
|
| 9 |
import preprocess
|
| 10 |
from huggingface_hub import login
|
| 11 |
|
| 12 |
-
def
|
| 13 |
print(input_img, type(input_img), cls)
|
| 14 |
|
| 15 |
input_dir = "input_image"
|
|
@@ -51,10 +51,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 51 |
with gr.Row():
|
| 52 |
with gr.Column():
|
| 53 |
input_image = gr.Image(label="Input Image", type='pil', height="400px", show_label=True)
|
| 54 |
-
dropdown = gr.Dropdown(["upper", "lower", "dress"], value="upper", label="Extract
|
| 55 |
-
info="Select the
|
| 56 |
|
| 57 |
-
output_image = gr.Image(label="Extracted
|
| 58 |
show_download_button=True)
|
| 59 |
|
| 60 |
with gr.Row():
|
|
@@ -63,7 +63,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 63 |
|
| 64 |
gr.on(
|
| 65 |
triggers=[submit_button.click],
|
| 66 |
-
fn=
|
| 67 |
inputs=[input_image, dropdown],
|
| 68 |
outputs=[output_image]
|
| 69 |
)
|
|
|
|
| 9 |
import preprocess
|
| 10 |
from huggingface_hub import login
|
| 11 |
|
| 12 |
+
def extract_clothes(input_img, cls):
|
| 13 |
print(input_img, type(input_img), cls)
|
| 14 |
|
| 15 |
input_dir = "input_image"
|
|
|
|
| 51 |
with gr.Row():
|
| 52 |
with gr.Column():
|
| 53 |
input_image = gr.Image(label="Input Image", type='pil', height="400px", show_label=True)
|
| 54 |
+
dropdown = gr.Dropdown(["upper", "lower", "dress"], value="upper", label="Extract clothes",
|
| 55 |
+
info="Select the clothes type you wish to extract!")
|
| 56 |
|
| 57 |
+
output_image = gr.Image(label="Extracted clothes", type='pil', height="400px", show_label=True,
|
| 58 |
show_download_button=True)
|
| 59 |
|
| 60 |
with gr.Row():
|
|
|
|
| 63 |
|
| 64 |
gr.on(
|
| 65 |
triggers=[submit_button.click],
|
| 66 |
+
fn=extract_clothes,
|
| 67 |
inputs=[input_image, dropdown],
|
| 68 |
outputs=[output_image]
|
| 69 |
)
|