Spaces:
Runtime error
Runtime error
rebasing because omfg git lfs is a cluster
Browse files- .gitattributes +7 -0
- 02_production.ipynb +0 -0
- app.py +18 -0
- black-headed-tricolour.jpg +3 -0
- corgi-or-loaf.ipynb +0 -0
- export.pkl +3 -0
- fawn.jpg +3 -0
- red-headed-tricolour.jpg +3 -0
- red.jpg +3 -0
- requirements.txt +9 -0
- sable.jpg +3 -0
- timtam.jpg +3 -0
.gitattributes
CHANGED
|
@@ -29,3 +29,10 @@ 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 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
timtam.jpg filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
black-headed-tricolour.jpg filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
fawn.jpg filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
red-headed-tricolour.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
red.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
sable.jpg filter=lfs diff=lfs merge=lfs -text
|
02_production.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from fastai.vision.all import *
|
| 3 |
+
|
| 4 |
+
learn = load_learner('export.pkl')
|
| 5 |
+
|
| 6 |
+
labels = learn.dls.vocab
|
| 7 |
+
def 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 |
+
|
| 12 |
+
title = "Corgi coat colour classifer"
|
| 13 |
+
description = "An image classifier that classifies photos of adorable corgis by their coat colours. This will entice you to become owned by a corgi and I make no apologies."
|
| 14 |
+
examples = ['timtam.jpg']
|
| 15 |
+
interpretation='default'
|
| 16 |
+
enable_queue=True
|
| 17 |
+
|
| 18 |
+
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=5),title=title,description=description,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|
black-headed-tricolour.jpg
ADDED
|
Git LFS Details
|
corgi-or-loaf.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
export.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe0745808d52f1e6485be0bf22f13b5008bc2934f25128752b4fdc56ca8588d4
|
| 3 |
+
size 46997857
|
fawn.jpg
ADDED
|
Git LFS Details
|
red-headed-tricolour.jpg
ADDED
|
Git LFS Details
|
red.jpg
ADDED
|
Git LFS Details
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastai>=2.0.0
|
| 2 |
+
graphviz
|
| 3 |
+
ipywidgets
|
| 4 |
+
matplotlib
|
| 5 |
+
nbdev>=0.2.12
|
| 6 |
+
pandas
|
| 7 |
+
scikit_learn
|
| 8 |
+
azure-cognitiveservices-search-imagesearch
|
| 9 |
+
sentencepiece
|
sable.jpg
ADDED
|
Git LFS Details
|
timtam.jpg
ADDED
|
Git LFS Details
|