teacherc commited on
Commit
99b7369
·
1 Parent(s): 154f804

Upload 7 files

Browse files
.gitattributes CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ edgar_castrejon_unsplash.jpg filter=lfs diff=lfs merge=lfs -text
36
+ example.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
  title: Gourds
3
- emoji: 🔥
4
- colorFrom: indigo
5
- colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 3.15.0
8
  app_file: app.py
 
1
  ---
2
  title: Gourds
3
+ emoji: 👁
4
+ colorFrom: gray
5
+ colorTo: red
6
  sdk: gradio
7
  sdk_version: 3.15.0
8
  app_file: app.py
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+ import skimage
4
+
5
+ learn = load_learner('model.pkl')
6
+
7
+ labels = learn.dls.vocab
8
+ def predict(img):
9
+ img = PILImage.create(img)
10
+ pred,pred_idx,probs = learn.predict(img)
11
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
+
13
+ title = "Pet Breed Classifier"
14
+ description = "A winter squash classifer created by Candace Williams in fastai"
15
+ examples = ['david_trinks_unsplash.jpg', 'edgar_castrejon_unsplash.jpg', 'example.jpg' ]
16
+ interpretation='default'
17
+ enable_queue=True
18
+
19
+ 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()
david_trinks_unsplash.jpg ADDED
edgar_castrejon_unsplash.jpg ADDED

Git LFS Details

  • SHA256: e4f9c6a483f6e2fbca76d35b63123be6c5ed2d88110b9ae6359b453e56617be6
  • Pointer size: 132 Bytes
  • Size of remote file: 3.07 MB
example.jpg ADDED

Git LFS Details

  • SHA256: 072f433e44fb0189f3f7ab3a26b07b3eed185187112d36d4f06419ead8b7de3d
  • Pointer size: 132 Bytes
  • Size of remote file: 2.09 MB
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0907ecd5c479f4c646d8ec8cb357d70c46bb32c801800598d641d92e7c4221f
3
+ size 47026283
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ scikit-image