HugoHE commited on
Commit
9b1980e
·
1 Parent(s): b36f6d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -175,7 +175,7 @@ def inference_gd(file):
175
 
176
 
177
  examples = ["examples/0.jpg", "examples/1.jpg", "examples/2.jpg", "examples/3.jpg"]
178
- with gr.Blocks() as demo:
179
  gr.Markdown("# Runtime Monitoring Object Detection")
180
  gr.Markdown(
181
  """This interactive demo is based on the box abstraction-based monitors for Faster R-CNN model. The model is trained using [Detectron2](https://github.com/facebookresearch/detectron2) library on the in-distribution dataset [Berkeley DeepDrive-100k](https://www.bdd100k.com/), which contains objects within autonomous driving domain. The monitors are constructed by abstraction of extracted feature from the training data. The demo showcases the monitors' capacity to reject problematic detections due to out-of-distribution(OOD) objects.
@@ -203,7 +203,7 @@ In case the output image seems too small, simply right-click on the image, and c
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()
209
 
 
175
 
176
 
177
  examples = ["examples/0.jpg", "examples/1.jpg", "examples/2.jpg", "examples/3.jpg"]
178
+ with gr.Blocks(theme='gradio/monochrome') as demo:
179
  gr.Markdown("# Runtime Monitoring Object Detection")
180
  gr.Markdown(
181
  """This interactive demo is based on the box abstraction-based monitors for Faster R-CNN model. The model is trained using [Detectron2](https://github.com/facebookresearch/detectron2) library on the in-distribution dataset [Berkeley DeepDrive-100k](https://www.bdd100k.com/), which contains objects within autonomous driving domain. The monitors are constructed by abstraction of extracted feature from the training data. The demo showcases the monitors' capacity to reject problematic detections due to out-of-distribution(OOD) objects.
 
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], cache_examples=True)
207
 
208
  demo.launch()
209