Spaces:
Sleeping
Sleeping
initial commit
Browse files- .gitattributes +1 -0
- IMG_3558.jpg +3 -0
- app.py +25 -0
- export.pkl +3 -0
- requirements.txt +2 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
IMG_3558.jpg filter=lfs diff=lfs merge=lfs -text
|
IMG_3558.jpg
ADDED
Git LFS Details
|
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from fastai.vision.all import *
|
3 |
+
import skimage
|
4 |
+
|
5 |
+
learn = load_learner("export.pkl")
|
6 |
+
|
7 |
+
|
8 |
+
def predict(img):
|
9 |
+
img = PILImage.create(img)
|
10 |
+
pred, pred_idx, probs = learn.predict(img)
|
11 |
+
result = f"Prediction: {pred}; Probability: {probs[pred_idx]:.04f}"
|
12 |
+
return result
|
13 |
+
|
14 |
+
|
15 |
+
gr.Interface(
|
16 |
+
fn=predict,
|
17 |
+
inputs=gr.inputs.Image(shape=(512, 512)),
|
18 |
+
outputs=gr.outputs.Label(num_top_classes=3),
|
19 |
+
title="Saving the silkies",
|
20 |
+
description="A pigeon/silkie classifier. Create as a demo for entertainment and educational purposes.",
|
21 |
+
article="<p style='text-align: center'><a href='LINK_HERE' target='_blank'>Blog post</a></p>",
|
22 |
+
examples=["IMG_3558.jpg"],
|
23 |
+
interpretation="default",
|
24 |
+
enable_queue=True,
|
25 |
+
).launch(share=True)
|
export.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:adce001fc69101a7b6963e28579f6e185ff8a9677508444e9fcc8f3d39c5a51e
|
3 |
+
size 46968463
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
fastai
|
2 |
+
scikit-image
|