Colbe commited on
Commit
c949dc9
1 Parent(s): a7e2e40

Upload 7 files

Browse files
.gitattributes CHANGED
@@ -29,3 +29,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
32
+ zachlavine.jpg filter=lfs diff=lfs merge=lfs -text
bensimmons.jpg ADDED
identifier.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+
4
+ def which_player(x): return x[0].isupper()
5
+
6
+ learn = load_learner('model.pkl')
7
+
8
+ categories = ('Kevin Durant', 'Kyrie Irving', 'Ben Simmons', 'Kawhi Leonard', 'Zach Lavine')
9
+
10
+ def classify_image(img):
11
+ pred, ids, probs = learn.predict(img)
12
+ return dict(zip(categories, map(float, probs)))
13
+
14
+ image = gr.inputs.Image(shape=(192, 192))
15
+ label = gr.outputs.Label()
16
+ examples = ['kevindurant.jpg', 'kyrieirving.jpg', 'kawhileonard.jpg', 'bensimmons.jpg', 'zachlavine.jpg']
17
+
18
+ iface = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
19
+ iface.launch(inline=False)
kawhileonard.jpg ADDED
kevindurant.jpg ADDED
kyrieirving.jpg ADDED
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fba97d8c849abd3ba5b8175e7ae539df77322b123cb1dd2d192584872a5613d9
3
+ size 46974049
zachlavine.jpg ADDED

Git LFS Details

  • SHA256: aeebe29e35f8d89501c220554ae0fd0f9250e9fa9e4155b4db0e258f11e283d2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.3 MB