import gradio as gr def predict(image): return image inp = gr.inputs.Image(source="webcam", shape=(224,224)) iface = gr.Interface(fn=predict, inputs=inp, outputs=predict ) iface.launch()