lyhue1991 commited on
Commit
58fef00
β€’
1 Parent(s): 238c584

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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("ζ‰§θ‘Œζ£€ζ΅‹",variant="primary")
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("ζ‰§θ‘Œζ£€ζ΅‹",variant="primary")
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("ζ‰§θ‘Œζ£€ζ΅‹",variant="primary")
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,