Spaces:
Runtime error
Runtime error
Gowtham M commited on
Commit ·
5e8b157
1
Parent(s): 76616f1
Add application file
Browse filesFiles changed (2)
- app.py+11-4
- export.pklAdded+3
12343456789671011121314from fastai.vision.all import *import gradio as grlearn = load_learner('export.pkl')
def greet(name): return "Hello " + name + "!!"actors = learn.dls.vocabdef classify_images(img): pred, idx, prob = learn.predict(img) return dict(zip(actors, map(float, prob)))
iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch()image = gr.Image(height=192, width= 192)label = gr.Label()examples = ['rajini.jpg', 'vijay.jpg']intf = gr.Interface(fn = classify_images, inputs = image, outputs=label, examples=examples)intf.launch(inline=False)123version https://git-lfs.github.com/spec/v1oid sha256:bf5e71d90d2549ccf74395d9acf6e3018231a79ed4839b80786781750ee8f1cdsize 61146133app.py+11-4
export.pklAdded+3