from fastai.vision.all import * import gradio as gr learn = load_learner('model.pkl') def is_cat(img): return 0 iface = gr.Interface(fn=is_cat, inputs="text", outputs="text") iface.launch()