Update app.py
Browse files
app.py
CHANGED
@@ -212,25 +212,25 @@ with gr.Blocks() as iface:
|
|
212 |
with gr.Row():
|
213 |
with gr.Column():
|
214 |
input_image = gr.Image(type="pil", label="Input Image")
|
215 |
-
input_video = gr.Video(label="Input Video")
|
216 |
-
with gr.Column():
|
217 |
-
output_image = gr.Image(label="Detect Object")
|
218 |
-
# Tombol untuk memproses gambar
|
219 |
detect_image_button = gr.Button("Detect Image")
|
|
|
220 |
detect_image_button.click(
|
221 |
fn=detect_combined,
|
222 |
inputs=input_image,
|
223 |
outputs=[output_image, output_text]
|
224 |
)
|
225 |
-
|
226 |
-
|
|
|
227 |
detect_video_button = gr.Button("Detect Video")
|
|
|
228 |
detect_video_button.click(
|
229 |
fn=detect_objects_in_video,
|
230 |
inputs=input_video,
|
231 |
outputs=[output_video]
|
232 |
)
|
|
|
233 |
with gr.Column():
|
234 |
output_text = gr.Textbox(label="Counting Object")
|
235 |
|
236 |
-
iface.launch()
|
|
|
212 |
with gr.Row():
|
213 |
with gr.Column():
|
214 |
input_image = gr.Image(type="pil", label="Input Image")
|
|
|
|
|
|
|
|
|
215 |
detect_image_button = gr.Button("Detect Image")
|
216 |
+
output_image = gr.Image(label="Detect Object")
|
217 |
detect_image_button.click(
|
218 |
fn=detect_combined,
|
219 |
inputs=input_image,
|
220 |
outputs=[output_image, output_text]
|
221 |
)
|
222 |
+
|
223 |
+
with gr.Column():
|
224 |
+
input_video = gr.Video(label="Input Video")
|
225 |
detect_video_button = gr.Button("Detect Video")
|
226 |
+
output_video = gr.Video(label="Output Video")
|
227 |
detect_video_button.click(
|
228 |
fn=detect_objects_in_video,
|
229 |
inputs=input_video,
|
230 |
outputs=[output_video]
|
231 |
)
|
232 |
+
|
233 |
with gr.Column():
|
234 |
output_text = gr.Textbox(label="Counting Object")
|
235 |
|
236 |
+
iface.launch()
|