Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,34 +30,34 @@ def detect(img):
|
|
30 |
|
31 |
with gr.Blocks() as demo:
|
32 |
|
33 |
-
with gr.Tab("
|
34 |
input_img = gr.Image(source='webcam',type='pil')
|
35 |
-
button = gr.Button("
|
36 |
|
37 |
-
gr.Markdown("##
|
38 |
out_img = gr.Image(type='pil')
|
39 |
|
40 |
button.click(detect,
|
41 |
inputs=input_img,
|
42 |
outputs=out_img)
|
43 |
|
44 |
-
with gr.Tab("
|
45 |
default_url = 'https://t7.baidu.com/it/u=3601447414,1764260638&fm=193&f=GIF'
|
46 |
url = gr.Textbox(value=default_url)
|
47 |
-
button = gr.Button("
|
48 |
|
49 |
-
gr.Markdown("##
|
50 |
out_img = gr.Image(type='pil')
|
51 |
|
52 |
button.click(detect,
|
53 |
inputs=url,
|
54 |
outputs=out_img)
|
55 |
|
56 |
-
with gr.Tab("
|
57 |
input_img = gr.Image(type='pil')
|
58 |
-
button = gr.Button("
|
59 |
|
60 |
-
gr.Markdown("##
|
61 |
out_img = gr.Image(type='pil')
|
62 |
|
63 |
button.click(detect,
|
|
|
30 |
|
31 |
with gr.Blocks() as demo:
|
32 |
|
33 |
+
with gr.Tab("Webcam"):
|
34 |
input_img = gr.Image(source='webcam',type='pil')
|
35 |
+
button = gr.Button("Detect",variant="primary")
|
36 |
|
37 |
+
gr.Markdown("## Output")
|
38 |
out_img = gr.Image(type='pil')
|
39 |
|
40 |
button.click(detect,
|
41 |
inputs=input_img,
|
42 |
outputs=out_img)
|
43 |
|
44 |
+
with gr.Tab("Url"):
|
45 |
default_url = 'https://t7.baidu.com/it/u=3601447414,1764260638&fm=193&f=GIF'
|
46 |
url = gr.Textbox(value=default_url)
|
47 |
+
button = gr.Button("Detect",variant="primary")
|
48 |
|
49 |
+
gr.Markdown("## Output")
|
50 |
out_img = gr.Image(type='pil')
|
51 |
|
52 |
button.click(detect,
|
53 |
inputs=url,
|
54 |
outputs=out_img)
|
55 |
|
56 |
+
with gr.Tab("Upload"):
|
57 |
input_img = gr.Image(type='pil')
|
58 |
+
button = gr.Button("Detect",variant="primary")
|
59 |
|
60 |
+
gr.Markdown("## Output")
|
61 |
out_img = gr.Image(type='pil')
|
62 |
|
63 |
button.click(detect,
|