Update run.py
Browse files
run.py
CHANGED
@@ -46,15 +46,15 @@ with gr.Blocks() as demo:
|
|
46 |
inp = gr.Image(sources=["webcam"], streaming=True)
|
47 |
inp.stream(segment, inputs=inp, outputs=[gr.Image()])
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
|
59 |
# from gradio_webrtc import WebRTC
|
60 |
|
@@ -79,5 +79,5 @@ with gr.Blocks() as demo:
|
|
79 |
# live=True
|
80 |
# )
|
81 |
|
82 |
-
if __name__ == "__main__":
|
83 |
-
|
|
|
46 |
inp = gr.Image(sources=["webcam"], streaming=True)
|
47 |
inp.stream(segment, inputs=inp, outputs=[gr.Image()])
|
48 |
|
49 |
+
demo = gr.Interface(
|
50 |
+
segment,
|
51 |
+
[gr.Image(sources=["webcam"], streaming=True)],
|
52 |
+
["image"],
|
53 |
+
)
|
54 |
|
55 |
+
if __name__ == "__main__":
|
56 |
|
57 |
+
demo.queue().launch()
|
58 |
|
59 |
# from gradio_webrtc import WebRTC
|
60 |
|
|
|
79 |
# live=True
|
80 |
# )
|
81 |
|
82 |
+
# if __name__ == "__main__":
|
83 |
+
# demo.queue().launch()
|