Spaces:
Runtime error
Runtime error
import gradio as gr | |
import numpy as np | |
from ml_predict import preprocess_img,predict_defect | |
image = gr.inputs.Image(shape=(256, 256)) | |
label = gr.outputs.Label(num_top_classes=3) | |
gr.Interface(fn=predict_defect, inputs=image, outputs=label, theme='peach',examples=[["cr.jpeg"], ["Pa1.jpeg"], ["rol1.jpeg"], ["sc1.jpeg"]]).launch() | |