Spaces:
Runtime error
Runtime error
| __all__ = ['learn', 'classify_image', 'categories', 'image', 'label', 'intf'] | |
| from fastai.vision.all import * | |
| import gradio as gr | |
| learn = load_learner('export (1).pkl') | |
| def classify_image(img): | |
| pred, idx, probs = learn.predict(img) | |
| return pred | |
| image=gr.Image() | |
| label = gr.Label() | |
| intf = gr.Interface(fn=classify_image, inputs=image, outputs=label) | |
| intf.launch() | |