HugoHE commited on
Commit
59dd5ea
·
1 Parent(s): 3f22aa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -190,19 +190,21 @@ To utilize the demo, upload an image or select one from the provided examples, a
190
  In case the output image seems too small, simply right-click on the image, and choose “Open image in new tab” to visualize it in full size.
191
  """
192
  )
193
- with gr.Row():
194
  with gr.Column():
195
  image = gr.Image(type="filepath", label="Input")
196
  button = gr.Button("Infer")
197
- eamples_block = gr.Examples(examples, image)
198
  with gr.Column():
199
  with gr.Tab("Detection"):
200
  detection = gr.Image(label="Output")
 
 
201
  with gr.Tab("Verdict"):
202
  verdict = gr.Image(label="Output")
203
  with gr.Tab("Explainable AI"):
204
  cam = gr.Image(label="Output")
205
- df = gr.Dataframe(label="Detection summary")
206
  button.click(fn=inference_gd, inputs=image, outputs=[detection, df, verdict, cam])
207
 
208
  demo.launch()
 
190
  In case the output image seems too small, simply right-click on the image, and choose “Open image in new tab” to visualize it in full size.
191
  """
192
  )
193
+ with gr.Row().style(equal_height=True):
194
  with gr.Column():
195
  image = gr.Image(type="filepath", label="Input")
196
  button = gr.Button("Infer")
197
+
198
  with gr.Column():
199
  with gr.Tab("Detection"):
200
  detection = gr.Image(label="Output")
201
+ with gr.Tab("Detection summary"):
202
+ df = gr.Dataframe(label="Detection summary")
203
  with gr.Tab("Verdict"):
204
  verdict = gr.Image(label="Output")
205
  with gr.Tab("Explainable AI"):
206
  cam = gr.Image(label="Output")
207
+ examples_block = gr.Examples(inputs=image, examples=examples, fn=inference_gd, outputs=[detection, df, verdict, cam], cache_examples=True)
208
  button.click(fn=inference_gd, inputs=image, outputs=[detection, df, verdict, cam])
209
 
210
  demo.launch()