Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -552,16 +552,27 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
|
|
| 552 |
""")
|
| 553 |
|
| 554 |
with gr.Row(equal_height=True):
|
| 555 |
-
# LEFT PANEL
|
| 556 |
with gr.Column(scale=4):
|
| 557 |
gr.HTML('<div class="section-title">๐ค Input Panel</div>')
|
|
|
|
|
|
|
| 558 |
|
|
|
|
|
|
|
| 559 |
input_image = gr.Image(
|
| 560 |
type="numpy",
|
| 561 |
label="Upload PCB Image",
|
| 562 |
height=360
|
| 563 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
|
|
|
|
|
|
|
| 565 |
conf_slider = gr.Slider(
|
| 566 |
minimum=0.10,
|
| 567 |
maximum=0.90,
|
|
@@ -569,29 +580,27 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
|
|
| 569 |
step=0.05,
|
| 570 |
label="Confidence Threshold"
|
| 571 |
)
|
|
|
|
|
|
|
| 572 |
|
|
|
|
|
|
|
| 573 |
with gr.Row():
|
| 574 |
detect_btn = gr.Button("Run Inspection", variant="primary")
|
| 575 |
clear_btn = gr.Button("Clear", variant="secondary")
|
|
|
|
|
|
|
| 576 |
|
|
|
|
|
|
|
| 577 |
gr.HTML("""
|
| 578 |
<div class="card-subtext">
|
| 579 |
Supported formats: <b>JPG, JPEG, PNG</b><br>
|
| 580 |
Recommended: clear grayscale PCB images similar to DeepPCB-style inspection images.
|
| 581 |
</div>
|
| 582 |
""")
|
| 583 |
-
|
| 584 |
-
# RIGHT PANEL
|
| 585 |
with gr.Column(scale=6):
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
output_image = gr.Image(
|
| 589 |
-
type="numpy",
|
| 590 |
-
label="Annotated PCB Output",
|
| 591 |
-
height=360
|
| 592 |
-
)
|
| 593 |
-
|
| 594 |
-
summary_html = gr.HTML(empty_summary_cards())
|
| 595 |
|
| 596 |
gr.HTML('<div class="section-title" style="margin-top:18px;">๐ Intelligent Inspection Report</div>')
|
| 597 |
report_html = gr.HTML(empty_report())
|
|
|
|
| 552 |
""")
|
| 553 |
|
| 554 |
with gr.Row(equal_height=True):
|
|
|
|
| 555 |
with gr.Column(scale=4):
|
| 556 |
gr.HTML('<div class="section-title">๐ค Input Panel</div>')
|
| 557 |
+
with gr.Column(scale=6):
|
| 558 |
+
gr.HTML('<div class="section-title">๐ Detection Output</div>')
|
| 559 |
|
| 560 |
+
with gr.Row(equal_height=True):
|
| 561 |
+
with gr.Column(scale=4):
|
| 562 |
input_image = gr.Image(
|
| 563 |
type="numpy",
|
| 564 |
label="Upload PCB Image",
|
| 565 |
height=360
|
| 566 |
)
|
| 567 |
+
with gr.Column(scale=6):
|
| 568 |
+
output_image = gr.Image(
|
| 569 |
+
type="numpy",
|
| 570 |
+
label="Annotated PCB Output",
|
| 571 |
+
height=360
|
| 572 |
+
)
|
| 573 |
|
| 574 |
+
with gr.Row(equal_height=True):
|
| 575 |
+
with gr.Column(scale=4):
|
| 576 |
conf_slider = gr.Slider(
|
| 577 |
minimum=0.10,
|
| 578 |
maximum=0.90,
|
|
|
|
| 580 |
step=0.05,
|
| 581 |
label="Confidence Threshold"
|
| 582 |
)
|
| 583 |
+
with gr.Column(scale=6):
|
| 584 |
+
summary_html = gr.HTML(empty_summary_cards())
|
| 585 |
|
| 586 |
+
with gr.Row(equal_height=True):
|
| 587 |
+
with gr.Column(scale=4):
|
| 588 |
with gr.Row():
|
| 589 |
detect_btn = gr.Button("Run Inspection", variant="primary")
|
| 590 |
clear_btn = gr.Button("Clear", variant="secondary")
|
| 591 |
+
with gr.Column(scale=6):
|
| 592 |
+
pass
|
| 593 |
|
| 594 |
+
with gr.Row(equal_height=True):
|
| 595 |
+
with gr.Column(scale=4):
|
| 596 |
gr.HTML("""
|
| 597 |
<div class="card-subtext">
|
| 598 |
Supported formats: <b>JPG, JPEG, PNG</b><br>
|
| 599 |
Recommended: clear grayscale PCB images similar to DeepPCB-style inspection images.
|
| 600 |
</div>
|
| 601 |
""")
|
|
|
|
|
|
|
| 602 |
with gr.Column(scale=6):
|
| 603 |
+
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 604 |
|
| 605 |
gr.HTML('<div class="section-title" style="margin-top:18px;">๐ Intelligent Inspection Report</div>')
|
| 606 |
report_html = gr.HTML(empty_report())
|