Spaces:
Runtime error
Runtime error
!pip install huggingface_hub["fastai"] | |
import gradio as gr | |
import fastai* | |
learn = load_learner(path/'export.pkl') | |
def image_classifier(inp): | |
pred, pred_idx, probs = learn.predict(inp) | |
label = f'Prediction: {pred}; Probability: {probs[pred_idx]:.04f}' | |
return label | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |