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