Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,23 +57,19 @@ with gr.Blocks() as app:
|
|
57 |
with gr.Row():
|
58 |
with gr.Column(scale=1, min_width=300):
|
59 |
# gr.Markdown('Upload image to detect Potato or Sweet Potato')
|
60 |
-
img_input = gr.Image(type='pil', label='Upload Image to detect Potato or Sweet Potato',height=
|
61 |
-
img_output = gr.Image(type='pil', label='Download Image',height=
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
clear_image_button = gr.Button('Clear Image')
|
67 |
-
clear_image_button.click(fn=lambda: None, inputs=None, outputs=img_input)
|
68 |
with gr.Column(scale=1, min_width=300):
|
69 |
# gr.Markdown('Upload video to detect Potato or Sweet Potato')
|
70 |
-
video_input = gr.Video(label='Upload Video to detect Potato or Sweet Potato', height=
|
71 |
-
video_output = gr.Video(label='Download Video', autoplay=True, loop=True,show_share_button=True, show_download_button=True,height=
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
clear_video_button = gr.Button('Clear Video')
|
77 |
-
clear_video_button.click(fn=lambda: None, inputs=None, outputs=video_input)
|
78 |
|
79 |
app.launch()
|
|
|
57 |
with gr.Row():
|
58 |
with gr.Column(scale=1, min_width=300):
|
59 |
# gr.Markdown('Upload image to detect Potato or Sweet Potato')
|
60 |
+
img_input = gr.Image(type='pil', label='Upload Image to detect Potato or Sweet Potato',height=300,min_width=300)
|
61 |
+
img_output = gr.Image(type='pil', label='Download Image',height=300,min_width=300)
|
62 |
+
img_button = gr.Button('Analyze Image')
|
63 |
+
img_button.click(detect_image, inputs=img_input, outputs=img_output,)
|
64 |
+
clear_image_button = gr.Button('Clear Image')
|
65 |
+
clear_image_button.click(fn=lambda: None, inputs=None, outputs=img_input)
|
|
|
|
|
66 |
with gr.Column(scale=1, min_width=300):
|
67 |
# gr.Markdown('Upload video to detect Potato or Sweet Potato')
|
68 |
+
video_input = gr.Video(label='Upload Video to detect Potato or Sweet Potato', height=300,min_width=300)
|
69 |
+
video_output = gr.Video(label='Download Video', autoplay=True, loop=True,show_share_button=True, show_download_button=True,height=300, min_width=300)
|
70 |
+
video_button = gr.Button('Analyse Video')
|
71 |
+
video_button.click(detect_video, inputs=video_input, outputs=video_output)
|
72 |
+
clear_video_button = gr.Button('Clear Video')
|
73 |
+
clear_video_button.click(fn=lambda: None, inputs=None, outputs=video_input)
|
|
|
|
|
74 |
|
75 |
app.launch()
|