pord123 commited on
Commit
7691811
·
1 Parent(s): 282c5af

pokemon model

Browse files
Files changed (5) hide show
  1. .DS_Store +0 -0
  2. app.py +5 -6
  3. model.pkl +2 -2
  4. siamese.jpg +0 -0
  5. vulpix.png +0 -0
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
4
 
5
- def is_cat(x): return x[0].isupper()
6
 
7
  learn = load_learner('export.pkl')
8
 
@@ -12,11 +12,10 @@ def predict(img):
12
  pred,pred_idx,probs = learn.predict(img)
13
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
14
 
15
- title = "Pet Breed Classifier"
16
- description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
17
- article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
18
- examples = ['siamese.jpg']
19
  interpretation='default'
20
  enable_queue=True
21
 
22
- gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
 
2
  from fastai.vision.all import *
3
  import skimage
4
 
5
+ def is_pokemon(x): return x.parent_label
6
 
7
  learn = load_learner('export.pkl')
8
 
 
12
  pred,pred_idx,probs = learn.predict(img)
13
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
14
 
15
+ title = "Pokemon Classifier"
16
+ description = "is it a pokemon"
17
+ examples = ['vulpix.jpg']
 
18
  interpretation='default'
19
  enable_queue=True
20
 
21
+ gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
model.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e7c2ab34378e55e73df18ba52048a9e45369aa2896dee9397c4a35f9d7ab6b4f
3
- size 47061355
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:599070bcfabbcd0528cf216989def22c0a99862956fe5559af496d2ff7555cc4
3
+ size 46966831
siamese.jpg DELETED
Binary file (8.7 kB)
 
vulpix.png ADDED