import gradio as gr def predict(img): return "cat" demo = gr.Interface( fn=predict, inputs=gr.Image(type="pil"), outputs=gr.Label(num_top_classes=3), ) demo.launch(server_name="0.0.0.0", server_port=7860)