Update app.py
Browse files
app.py
CHANGED
|
@@ -77,11 +77,11 @@ outputs_video = gr.Image(type="numpy", label="Detection Output")
|
|
| 77 |
with gr.Blocks() as demo:
|
| 78 |
with gr.TabItem("Image"):
|
| 79 |
gr.Interface(
|
| 80 |
-
fn=lambda img, model_name: predict_image(img, load_model(model_name.lower(), num_classes=6)),
|
| 81 |
inputs=inputs_image,
|
| 82 |
outputs=outputs_image,
|
| 83 |
title="Image Inference"
|
| 84 |
-
)
|
| 85 |
|
| 86 |
with gr.TabItem("Video"):
|
| 87 |
gr.Interface(
|
|
@@ -89,6 +89,7 @@ with gr.Blocks() as demo:
|
|
| 89 |
inputs=inputs_video,
|
| 90 |
outputs=outputs_video,
|
| 91 |
title="Video Inference"
|
| 92 |
-
)
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
demo.launch()
|
|
|
|
| 77 |
with gr.Blocks() as demo:
|
| 78 |
with gr.TabItem("Image"):
|
| 79 |
gr.Interface(
|
| 80 |
+
fn=lambda img, model_name: predict_image(img, load_model( model_name.lower(), num_classes=6)),
|
| 81 |
inputs=inputs_image,
|
| 82 |
outputs=outputs_image,
|
| 83 |
title="Image Inference"
|
| 84 |
+
)
|
| 85 |
|
| 86 |
with gr.TabItem("Video"):
|
| 87 |
gr.Interface(
|
|
|
|
| 89 |
inputs=inputs_video,
|
| 90 |
outputs=outputs_video,
|
| 91 |
title="Video Inference"
|
| 92 |
+
)
|
| 93 |
+
|
| 94 |
+
demo.launch()
|
| 95 |
|
|
|