File size: 496 Bytes
397dad3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
from inference import predict

def classify(image):
    idx, label, probs = predict(image)
    return {label: float(1.0)}

demo = gr.Interface(
    fn=classify,
    inputs=gr.Image(type="filepath", label="Upload a dermatoscopic image"),
    outputs=gr.Label(label="Predicted lesion"),
    title="Derm-CNN HAM10000 – Skin Lesion Classifier",
    description="Upload a dermatoscopic image and get the predicted skin lesion class.",
    allow_flagging="never"
)

demo.launch()