Spaces:
Sleeping
Sleeping
jovian
commited on
Commit
·
53be4a7
1
Parent(s):
6c7ade3
login
Browse files
app.py
CHANGED
|
@@ -406,7 +406,7 @@ with gr.Blocks() as demo:
|
|
| 406 |
with gr.Column():
|
| 407 |
gr.Markdown("### Output")
|
| 408 |
output_image_component = gr.Image(type="pil", label="Annotated Image")
|
| 409 |
-
apply_detection_btn = gr.Button("Apply Detection")
|
| 410 |
output_annotations = gr.State() # Store annotations
|
| 411 |
apply_detection_btn.click(apply_detection, inputs=upload_image_component, outputs=[output_image_component, output_annotations])
|
| 412 |
|
|
@@ -426,7 +426,7 @@ with gr.Blocks() as demo:
|
|
| 426 |
|
| 427 |
# Button to generate graphs
|
| 428 |
with gr.Row(visible=False) as area_btn_row:
|
| 429 |
-
graph_btn = gr.Button("Generate Area Distribution Graphs")
|
| 430 |
graph_btn.click(generate_graphs_btn, inputs=output_annotations, outputs=[
|
| 431 |
nicks_graph_component, dents_graph_component,
|
| 432 |
scratches_graph_component, pittings_graph_component
|
|
@@ -443,7 +443,7 @@ with gr.Blocks() as demo:
|
|
| 443 |
|
| 444 |
# Row for frequency graph btn
|
| 445 |
with gr.Row(visible=False) as frequency_btn_row:
|
| 446 |
-
freq_graph_btn = gr.Button("Generate Frequency Graph")
|
| 447 |
freq_graph_btn.click(detection.generate_frequency_graph,
|
| 448 |
inputs=output_annotations,
|
| 449 |
outputs=frequency_graph_component)
|
|
|
|
| 406 |
with gr.Column():
|
| 407 |
gr.Markdown("### Output")
|
| 408 |
output_image_component = gr.Image(type="pil", label="Annotated Image")
|
| 409 |
+
apply_detection_btn = gr.Button("Apply Detection", variant='primary')
|
| 410 |
output_annotations = gr.State() # Store annotations
|
| 411 |
apply_detection_btn.click(apply_detection, inputs=upload_image_component, outputs=[output_image_component, output_annotations])
|
| 412 |
|
|
|
|
| 426 |
|
| 427 |
# Button to generate graphs
|
| 428 |
with gr.Row(visible=False) as area_btn_row:
|
| 429 |
+
graph_btn = gr.Button("Generate Area Distribution Graphs",variant='primary')
|
| 430 |
graph_btn.click(generate_graphs_btn, inputs=output_annotations, outputs=[
|
| 431 |
nicks_graph_component, dents_graph_component,
|
| 432 |
scratches_graph_component, pittings_graph_component
|
|
|
|
| 443 |
|
| 444 |
# Row for frequency graph btn
|
| 445 |
with gr.Row(visible=False) as frequency_btn_row:
|
| 446 |
+
freq_graph_btn = gr.Button("Generate Frequency Graph",variant='primary')
|
| 447 |
freq_graph_btn.click(detection.generate_frequency_graph,
|
| 448 |
inputs=output_annotations,
|
| 449 |
outputs=frequency_graph_component)
|