Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
35 |
fn=detect_image,
|
36 |
inputs=gr.inputs.Image(source="upload"),
|
37 |
outputs="image",
|
38 |
title="Image"
|
39 |
)
|
40 |
|
41 |
-
|
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 = [
|
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"])
|