Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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 |
-
|
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()
|