Clocksp commited on
Commit
e50fb6a
·
verified ·
1 Parent(s): 4627dd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -241,6 +241,15 @@ with gr.Blocks(title=title) as demo:
241
  submit_btn = gr.Button("Submit", variant="primary")
242
  clear_btn = gr.Button("Clear", variant="secondary")
243
 
 
 
 
 
 
 
 
 
 
244
  submit_btn.click(
245
  inference_pipeline,
246
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],
@@ -252,13 +261,6 @@ with gr.Blocks(title=title) as demo:
252
  outputs=[img_in, pred_out, pb_out, pv_out, masked_img_out, overlay_out]
253
  )
254
 
255
- with gr.Column():
256
- pred_out = gr.Label(num_top_classes=1, label="Prediction")
257
- pb_out = gr.Number(label="Bacterial Probability")
258
- pv_out = gr.Number(label="Viral Probability")
259
- masked_img_out = gr.Image(type="pil", label="Masked Image")
260
- overlay_out = gr.Image(type="pil", label="Segmentation Overlay")
261
-
262
  img_in.change(
263
  inference_pipeline,
264
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],
 
241
  submit_btn = gr.Button("Submit", variant="primary")
242
  clear_btn = gr.Button("Clear", variant="secondary")
243
 
244
+
245
+
246
+ with gr.Column():
247
+ pred_out = gr.Label(num_top_classes=1, label="Prediction")
248
+ pb_out = gr.Number(label="Bacterial Probability")
249
+ pv_out = gr.Number(label="Viral Probability")
250
+ masked_img_out = gr.Image(type="pil", label="Masked Image")
251
+ overlay_out = gr.Image(type="pil", label="Segmentation Overlay")
252
+
253
  submit_btn.click(
254
  inference_pipeline,
255
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],
 
261
  outputs=[img_in, pred_out, pb_out, pv_out, masked_img_out, overlay_out]
262
  )
263
 
 
 
 
 
 
 
 
264
  img_in.change(
265
  inference_pipeline,
266
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],