whatplan/valorantImageIdentifier
0
1from fastai.vision.all import *2import gradio as gr3 4learn = load_learner('model.pkl')5 6labels = learn.dls.vocab7def predict(img):8 img = PILImage.create(img)9 pred,pred_idx,probs = learn.predict(img)10 return {labels[i]: float(probs[i]) for i in range(len(labels))}11 12gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(512, 512)), outputs=gr.outputs.Label(num_top_classes=3)).launch()13 14title = "Valorant Agent Indentifier"15description = "Identifies Valorant agent. Built with FastAI"16examples = ['brimstone.jpg']17interpretation='default'18enable_queue=True