import gradio as gr from PIL import Image def image_predict(image): # ... code to predict the class of the image goes here... pass iface = gr.Interface(fn=image_predict, inputs="image", outputs="label") iface.launch()