import gradio as gr from predict import predict demo = gr.Interface( fn=predict, inputs=gr.Image(type="filepath", label="Upload Image"), outputs=[ gr.Image(label="Uploaded Image"), gr.Image(label="Top-1 Class Example"), gr.Label(label="Top-5 Probabilities") ], title="Scene Classification with Reference Image Testing using Large SWIN version 1.1.0", description="Upload an image to get the predicted class with a sample image and top-5 prediction chart." ) demo.launch()