Clocksp commited on
Commit
55c1ad0
·
verified ·
1 Parent(s): 040d179

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -17
app.py CHANGED
@@ -250,28 +250,25 @@ with gr.Blocks(title=title) as demo:
250
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],
251
  outputs=[pred_out, pb_out, pv_out, masked_img_out, overlay_out]
252
  )
253
- img_normal_path = "images/NORMAL.jpeg"
254
- img_viral_path = "images/VIRAL.jpeg"
255
- img_bacterial_path = "images/BACT.jpeg"
256
- table_data = [
257
- [img_normal_path, "NORMAL"],
258
- [img_viral_path, "VIRAL"],
259
- [img_bacterial_path, "BACTERIAL"]
260
  ]
261
 
262
- gr.Markdown("### ☰ Test Samples")
263
-
264
- gr.Dataframe(
265
- value=table_data,
266
- headers=["Image", "Label1"],
267
- datatype=["image", "str"],
268
- show_label=False,
269
- interactive=False,
270
- min_height=350,
271
- wrap=True
272
  )
273
 
274
 
 
275
  if __name__ == "__main__":
276
  demo.launch()
277
 
 
250
  inputs=[img_in, thresh_b, thresh_v, seg_thresh],
251
  outputs=[pred_out, pb_out, pv_out, masked_img_out, overlay_out]
252
  )
253
+ example_samples = [
254
+ ["images/NORMAL.jpg", "NORMAL"],
255
+ ["images/VIRAL.jpg", "VIRAL"],
256
+ ["images/BACT.jpg", "BACTERIAL"],
 
 
 
257
  ]
258
 
259
+ gr.Dataset(
260
+ samples=example_samples,
261
+ # components=[
262
+ # gr.Image(type="filepath", label="Image", interactive=False),
263
+ # gr.Markdown(label="True Label")
264
+ # ],
265
+ headers=["Image", "True Label"],
266
+ # label="Examples Table",
267
+ layout="table"
 
268
  )
269
 
270
 
271
+
272
  if __name__ == "__main__":
273
  demo.launch()
274