CoolFace
Apppublic

DLBot/AlphabetRecognizer

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes
app.py17 linesDownload Raw Back to root
1import gradio as gr2from fastai.vision.all import *3learn=load_learner("model.pkl")4 5def classify_images(im):6    pred,idx,probs=learn.predict(im)7    s='Your submitted alphabet is '+pred8    return s9 10 11 12img=gr.Image(shape=(28,28),source="canvas",invert_colors=True)13label=gr.Label()14examples=["A.jpg","h.jpg","z.jpg"]15 16intf=gr.Interface(title="English Alphabets Recognition App",description="You can choose an example or draw in canvas. Press submit and model will recognize your input. This model only works on Capital Alphabets",fn=classify_images,inputs=img,outputs=label,examples=examples)17intf.launch(inline=False)