Spaces:
Runtime error
Runtime error
Upload 31 files
Browse files- .gitattributes +1 -0
- app.py +21 -0
- images/Boeing.jpg +0 -0
- images/Boeing.jpgZone.Identifier +0 -0
- images/bean.jpg +0 -0
- images/bean.jpgZone.Identifier +0 -0
- images/bird.jpg +0 -0
- images/bird.jpgZone.Identifier +0 -0
- images/boat.jpg +0 -0
- images/boat.jpgZone.Identifier +3 -0
- images/boeing.jpg +0 -0
- images/desk.jpg +0 -0
- images/desk.jpgZone.Identifier +0 -0
- images/fat-cat.jpg +0 -0
- images/fat-cat.jpgZone.Identifier +0 -0
- images/french.jpg +0 -0
- images/french.jpgZone.Identifier +3 -0
- images/house.jpg +3 -0
- images/house.jpgZone.Identifier +3 -0
- images/joker.jpg +0 -0
- images/joker.jpgZone.Identifier +0 -0
- images/tank.jpg +0 -0
- images/tank.jpgZone.Identifier +0 -0
- images/tesla.jpg +0 -0
- images/tesla.jpgZone.Identifier +0 -0
- images/tiger.jpg +0 -0
- images/tiger.jpgZone.Identifier +3 -0
- images/truck.jpg +0 -0
- images/truck.jpgZone.Identifier +0 -0
- images/wolf.jpg +0 -0
- model.pkl +3 -0
- requirements.txt +2 -0
.gitattributes
CHANGED
@@ -32,3 +32,4 @@ 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 |
+
images/house.jpg filter=lfs diff=lfs merge=lfs -text
|
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#|export
|
2 |
+
from fastai.vision.all import *
|
3 |
+
import gradio as gr
|
4 |
+
from fastbook import *
|
5 |
+
|
6 |
+
#|export
|
7 |
+
learn = load_learner('model.pkl')
|
8 |
+
|
9 |
+
#|export
|
10 |
+
def output(img):
|
11 |
+
predict,index,probs = learn.predict(img)
|
12 |
+
probs = torch.max(probs)
|
13 |
+
return f'The picture is appear to be {predict} with probability = {probs}'
|
14 |
+
|
15 |
+
#|export
|
16 |
+
image = gr.inputs.Image(shape=(192,192))
|
17 |
+
label = gr.outputs.Label()
|
18 |
+
examples = ['images/bean.jpg', 'images/tesla.jpg', 'images/Boeing.jpg', 'images/bird.jpg', 'images/boat.jpg',
|
19 |
+
'images/french.jpg','images/fat-cat.jpg']
|
20 |
+
intf = gr.Interface(fn=output, inputs=image, outputs=label, examples=examples)
|
21 |
+
intf.launch(inline=False)
|
images/Boeing.jpg
ADDED
![]() |
images/Boeing.jpgZone.Identifier
ADDED
File without changes
|
images/bean.jpg
ADDED
![]() |
images/bean.jpgZone.Identifier
ADDED
File without changes
|
images/bird.jpg
ADDED
![]() |
images/bird.jpgZone.Identifier
ADDED
File without changes
|
images/boat.jpg
ADDED
![]() |
images/boat.jpgZone.Identifier
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[ZoneTransfer]
|
2 |
+
ZoneId=3
|
3 |
+
HostUrl=about:internet
|
images/boeing.jpg
ADDED
![]() |
images/desk.jpg
ADDED
![]() |
images/desk.jpgZone.Identifier
ADDED
File without changes
|
images/fat-cat.jpg
ADDED
![]() |
images/fat-cat.jpgZone.Identifier
ADDED
File without changes
|
images/french.jpg
ADDED
![]() |
images/french.jpgZone.Identifier
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[ZoneTransfer]
|
2 |
+
ZoneId=3
|
3 |
+
HostUrl=about:internet
|
images/house.jpg
ADDED
![]() |
Git LFS Details
|
images/house.jpgZone.Identifier
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[ZoneTransfer]
|
2 |
+
ZoneId=3
|
3 |
+
HostUrl=about:internet
|
images/joker.jpg
ADDED
![]() |
images/joker.jpgZone.Identifier
ADDED
File without changes
|
images/tank.jpg
ADDED
![]() |
images/tank.jpgZone.Identifier
ADDED
File without changes
|
images/tesla.jpg
ADDED
![]() |
images/tesla.jpgZone.Identifier
ADDED
File without changes
|
images/tiger.jpg
ADDED
![]() |
images/tiger.jpgZone.Identifier
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[ZoneTransfer]
|
2 |
+
ZoneId=3
|
3 |
+
HostUrl=about:internet
|
images/truck.jpg
ADDED
![]() |
images/truck.jpgZone.Identifier
ADDED
File without changes
|
images/wolf.jpg
ADDED
![]() |
model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4d5f3ba69aa8c41bfcf79fc304ffc1942d7588fcc4b422e32445859c7a11ec4
|
3 |
+
size 103065265
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
fastai
|