[X] I have searched to see if a similar issue already exists.
Is your feature request related to a problem? Please describe.
related to #220
I tried the Image streaming function for webcam, and it can performed real time inference correctly.
I'm wondering is there a proper way to trigger start or stop the real time inference?
Describe the solution you'd like
Though I can use another Tab to stop the inference thread, I think it will be more easy to have a button to trigger.
Additional context
Here is my code for testing the Image stream function.
import gradio as gr
def image_mod(image):
return image.rotate(45)
block = gr.Blocks()
with block:
with gr.Tabs():
with gr.TabItem("Train"):
train = gr.Button("Train")
with gr.TabItem("Inference"):
with gr.Row():
input_image = gr.Image(type='pil',label="Input Image", source="webcam",
streaming=True)
output_image = gr.Image(label="Output Image")
input_image.change(image_mod,
inputs=input_image,
outputs=output_image)
block.launch(show_error=True, inbrowser=True)
Is your feature request related to a problem? Please describe.
related to #220 I tried the Image streaming function for webcam, and it can performed real time inference correctly. I'm wondering is there a proper way to trigger start or stop the real time inference?
Describe the solution you'd like
Though I can use another Tab to stop the inference thread, I think it will be more easy to have a button to trigger.
Additional context
Here is my code for testing the Image stream function.