# import gradio as gr # def greet(name): # return "Hello " + name + "!!" # iface = gr.Interface(fn=greet, inputs="text", outputs="text") # iface.launch() import gradio as gr from fastai.vision.all import * import skimage learn = load_learner("topmountainsmodel.pkl") def predict(img): img = PILImage.create(img) mt_type,_,probs = learn.predict(img) return mt_type iface = gr.Interface(fn=predict, inputs="image", outputs="label") iface.launch()