rosebe commited on
Commit
d3923d5
·
1 Parent(s): acba7af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,14 +31,14 @@ def detect_image(image):
31
  return results.render()[0]
32
 
33
  # Create Gradio interfaces for different modes
34
- webcam_interface = gr.Interface(
35
  fn=detect_image,
36
  inputs=gr.inputs.Image(source="upload"),
37
  outputs="image",
38
  title="Image"
39
  )
40
 
41
- file_interface = gr.Interface(
42
  fn=detect_image,
43
  inputs=gr.inputs.Video(source="upload"),
44
  outputs="video",
@@ -46,7 +46,7 @@ file_interface = gr.Interface(
46
  )
47
 
48
  # Create a list of interfaces
49
- interfaces = [webcam_interface, file_interface, url_interface]
50
 
51
  # Create the tabbed interface
52
  tabbed_interface = gr.TabbedInterface(interfaces, ["Image", "Video"])
 
31
  return results.render()[0]
32
 
33
  # Create Gradio interfaces for different modes
34
+ img_interface = gr.Interface(
35
  fn=detect_image,
36
  inputs=gr.inputs.Image(source="upload"),
37
  outputs="image",
38
  title="Image"
39
  )
40
 
41
+ vid_interface = gr.Interface(
42
  fn=detect_image,
43
  inputs=gr.inputs.Video(source="upload"),
44
  outputs="video",
 
46
  )
47
 
48
  # Create a list of interfaces
49
+ interfaces = [img_interface, vid_interface]
50
 
51
  # Create the tabbed interface
52
  tabbed_interface = gr.TabbedInterface(interfaces, ["Image", "Video"])