Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,8 @@ with demo:
|
|
41 |
gr.Markdown(description)
|
42 |
|
43 |
with gr.Tabs():
|
|
|
|
|
44 |
with gr.TabItem('Image Upload'):
|
45 |
with gr.Row():
|
46 |
|
@@ -55,8 +57,22 @@ with demo:
|
|
55 |
img_output= gr.Image()
|
56 |
|
57 |
img_button = gr.Button('Detect')
|
|
|
|
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
if __name__ == "__main__":
|
|
|
41 |
gr.Markdown(description)
|
42 |
|
43 |
with gr.Tabs():
|
44 |
+
|
45 |
+
#Image static
|
46 |
with gr.TabItem('Image Upload'):
|
47 |
with gr.Row():
|
48 |
|
|
|
57 |
img_output= gr.Image()
|
58 |
|
59 |
img_button = gr.Button('Detect')
|
60 |
+
|
61 |
+
img_button.click(detect_objects,inputs=img_input,outputs=[img_output, labels_bars])
|
62 |
|
63 |
+
#Image static
|
64 |
+
with gr.TabItem('Webcam'):
|
65 |
+
with gr.Row():
|
66 |
+
with gr.Column():
|
67 |
+
webcam_input = gr.Image(shape=(320,240), source='webcam', type="pil", )
|
68 |
+
webcam_output = gr.Image()
|
69 |
+
with gr.Column():
|
70 |
+
labels_bars2 = gr.Label(label = "Categories")
|
71 |
+
|
72 |
+
webcam_button = gr.Button('Detect')
|
73 |
+
|
74 |
+
webcam_button.click(detect_objects,inputs=webcam_input,outputs=[webcam_output, labels_bars2])
|
75 |
+
|
76 |
|
77 |
|
78 |
if __name__ == "__main__":
|