Spaces:
Sleeping
Sleeping
pokemon model
Browse files- .DS_Store +0 -0
- app.py +5 -6
- model.pkl +2 -2
- siamese.jpg +0 -0
- 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
|
| 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 = "
|
| 16 |
-
description = "
|
| 17 |
-
|
| 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,
|
|
|
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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
|