Spaces:
Running
Running
Commit
·
406d9b2
1
Parent(s):
fd3388a
update app layout
Browse files
app.py
CHANGED
@@ -119,35 +119,17 @@ css = """
|
|
119 |
|
120 |
with gr.Blocks(css=css) as demo:
|
121 |
with gr.Row():
|
|
|
122 |
with gr.Column(elem_id="col-input-image"):
|
123 |
-
gr.Markdown("
|
124 |
input_image = gr.Image(type="filepath")
|
125 |
-
generate_button = gr.Button("Generate", scale=0, variant="primary")
|
126 |
-
generated_prompt = gr.Markdown("")
|
127 |
with gr.Column(elem_id="col-container"):
|
128 |
-
gr.
|
129 |
-
|
130 |
-
with gr.Row():
|
131 |
-
prompt = gr.Text(
|
132 |
-
label="Prompt",
|
133 |
-
show_label=False,
|
134 |
-
max_lines=1,
|
135 |
-
placeholder="Enter your prompt",
|
136 |
-
container=False,
|
137 |
-
)
|
138 |
-
|
139 |
-
run_button = gr.Button("Run", scale=0, variant="primary")
|
140 |
|
141 |
result = gr.Image(label="Result", show_label=False)
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
fn=infer,
|
146 |
-
inputs=[
|
147 |
-
prompt,
|
148 |
-
],
|
149 |
-
outputs=[result],
|
150 |
-
)
|
151 |
|
152 |
gr.on(
|
153 |
triggers=[generate_button.click],
|
|
|
119 |
|
120 |
with gr.Blocks(css=css) as demo:
|
121 |
with gr.Row():
|
122 |
+
gr.Markdown("Draptic: from garment image to technical flat sketch")
|
123 |
with gr.Column(elem_id="col-input-image"):
|
124 |
+
gr.Markdown(" ## Drop your image here")
|
125 |
input_image = gr.Image(type="filepath")
|
|
|
|
|
126 |
with gr.Column(elem_id="col-container"):
|
127 |
+
generate_button = gr.Button("Generate flat sketch", scale=0, variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
result = gr.Image(label="Result", show_label=False)
|
130 |
+
|
131 |
+
gr.Markdown("## Description of the garment:")
|
132 |
+
generated_prompt = gr.Markdown("")
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
gr.on(
|
135 |
triggers=[generate_button.click],
|