File size: 522 Bytes
2c8e31c fa25033 2c8e31c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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()
|