Ahmed-El-Sharkawy commited on
Commit
72c5129
·
verified ·
1 Parent(s): 41b3e7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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
- ).render()
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
- ).render()
 
 
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