Update app.py
Browse files
app.py
CHANGED
|
@@ -287,52 +287,46 @@ with gr.Blocks(css=custom_css, title="Jewellery Photography Preview") as demo:
|
|
| 287 |
status_html.value = _update_status()
|
| 288 |
gr.Button("π Check Status").click(fn=_update_status, outputs=status_html)
|
| 289 |
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
<p style="color: #666; font-size: 14px;">Preview overlay detection and final professional background</p>
|
| 324 |
-
</div>
|
| 325 |
-
""")
|
| 326 |
-
info = gr.Markdown(value="...")
|
| 327 |
with gr.Row():
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
info1 = gr.Markdown(value="### Detection overlay")
|
| 335 |
-
out_overlay = gr.Image(height=400)
|
| 336 |
out_status = gr.Text(label="Status", interactive=False)
|
| 337 |
# ββββββββ Footer ββββββββ
|
| 338 |
gr.HTML("""
|
|
|
|
| 287 |
status_html.value = _update_status()
|
| 288 |
gr.Button("π Check Status").click(fn=_update_status, outputs=status_html)
|
| 289 |
|
| 290 |
+
with gr.Column():
|
| 291 |
+
with gr.Row():
|
| 292 |
+
|
| 293 |
+
with gr.Column(scale=0.4):
|
| 294 |
+
gr.HTML("""
|
| 295 |
+
<div class="feature-box"">
|
| 296 |
+
<h3>πΌοΈ Upload Jewellery Image</h3>
|
| 297 |
+
<p style="color: #666; font-size: 14px;">Select a clear jewellery image for best results</p>
|
| 298 |
+
</div>
|
| 299 |
+
""")
|
| 300 |
+
gr.Markdown("β")
|
| 301 |
+
gr.Markdown("β")
|
| 302 |
+
input_img = gr.Image(label="Upload image", type="pil", height=400)
|
| 303 |
+
|
| 304 |
+
# with gr.Column():
|
| 305 |
+
|
| 306 |
+
with gr.Column():
|
| 307 |
+
gr.HTML("""
|
| 308 |
+
<div class="feature-box">
|
| 309 |
+
<h3>π¨ AI Generated Results</h3>
|
| 310 |
+
<p style="color: #666; font-size: 14px;">Preview overlay detection and final professional background</p>
|
| 311 |
+
</div>
|
| 312 |
+
""")
|
| 313 |
+
|
| 314 |
+
with gr.Tabs():
|
| 315 |
+
with gr.TabItem("Final result"):
|
| 316 |
+
info2 = gr.Markdown(value="### Final result")
|
| 317 |
+
out_bg = gr.Image(height=400)
|
| 318 |
+
with gr.TabItem("Detection overlay"):
|
| 319 |
+
info1 = gr.Markdown(value="### Detection overlay")
|
| 320 |
+
out_overlay = gr.Image(height=400)
|
| 321 |
+
run_btn = gr.Button("π―Β Generate", elem_id="button", variant="primary")
|
| 322 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
with gr.Row():
|
| 324 |
+
with gr.Column(scale=0.4):
|
| 325 |
+
gr.Markdown(value="Setting")
|
| 326 |
+
category = gr.Dropdown(label="Jewellery category", choices=["Rings", "Bracelets", "Watches", "Earrings"], value="Bracelets")
|
| 327 |
+
gender = gr.Dropdown(label="Model gender", choices=["male", "female"], value="female")
|
| 328 |
+
|
| 329 |
+
|
|
|
|
|
|
|
| 330 |
out_status = gr.Text(label="Status", interactive=False)
|
| 331 |
# ββββββββ Footer ββββββββ
|
| 332 |
gr.HTML("""
|