dIN321 commited on
Commit
a7d5dfb
·
1 Parent(s): 224138e

Upload 31 files

Browse files
.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.jpgZone.Identifier ADDED
File without changes
images/bean.jpg ADDED
images/bean.jpgZone.Identifier ADDED
File without changes
images/bird.jpg ADDED
images/bird.jpgZone.Identifier ADDED
File without changes
images/boat.jpg ADDED
images/boat.jpgZone.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.jpgZone.Identifier ADDED
File without changes
images/fat-cat.jpg ADDED
images/fat-cat.jpgZone.Identifier ADDED
File without changes
images/french.jpg ADDED
images/french.jpgZone.Identifier ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [ZoneTransfer]
2
+ ZoneId=3
3
+ HostUrl=about:internet
images/house.jpg ADDED

Git LFS Details

  • SHA256: fa8123bc918c1e9a33cd90e680dff3a6e143dd9ca613fead0e881a31fa5ec495
  • Pointer size: 132 Bytes
  • Size of remote file: 1.41 MB
images/house.jpgZone.Identifier ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [ZoneTransfer]
2
+ ZoneId=3
3
+ HostUrl=about:internet
images/joker.jpg ADDED
images/joker.jpgZone.Identifier ADDED
File without changes
images/tank.jpg ADDED
images/tank.jpgZone.Identifier ADDED
File without changes
images/tesla.jpg ADDED
images/tesla.jpgZone.Identifier ADDED
File without changes
images/tiger.jpg ADDED
images/tiger.jpgZone.Identifier ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [ZoneTransfer]
2
+ ZoneId=3
3
+ HostUrl=about:internet
images/truck.jpg ADDED
images/truck.jpgZone.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