Tracking examples as binary files via git lfs
Browse files- .gitattributes +1 -0
- app.py +4 -20
- board-game-catan-IMG_4671.jpg +0 -0
- examples/Hotdog - Hot_dog_with_mustard.png +3 -0
- examples/board-game-catan-IMG_4671.jpg +3 -0
- examples/josh-at-reggie-wedding.jpeg +3 -0
- examples/photo-of-macbook-catan-IMG_4817.jpg +3 -0
- models/catan-model-paperspace-5.pkl +3 -0
- photo-of-macbook-catan-IMG_4817.jpg +0 -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 |
+
examples/*.* filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -1,29 +1,12 @@
|
|
1 |
-
# import gradio as gr
|
2 |
-
#
|
3 |
-
# def greet(name):
|
4 |
-
# return "Hello " + name + "!!"
|
5 |
-
#
|
6 |
-
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
-
# iface.launch()
|
8 |
-
|
9 |
-
# Cell
|
10 |
from fastai.vision.all import *
|
11 |
import gradio as gr
|
12 |
import timm
|
13 |
import dill
|
|
|
14 |
|
15 |
-
|
16 |
-
def is_catan(x):
|
17 |
-
# print(x[:5])
|
18 |
-
# print(x[:5] == 'Catan')
|
19 |
-
return x[:5] == 'Catan'
|
20 |
-
|
21 |
-
|
22 |
-
# Cell
|
23 |
-
learn = load_learner('./models/catan-model-paperspace-3.pkl', pickle_module=dill)
|
24 |
# learn = load_learner('catan-model.pkl', pickle_module=dill)
|
25 |
|
26 |
-
# Cell
|
27 |
# categories = learn.dls.vocab
|
28 |
categories = ('Not Catan', 'Catan')
|
29 |
|
@@ -36,7 +19,8 @@ def classify_image(img):
|
|
36 |
# Cell
|
37 |
image = gr.inputs.Image(shape=(192, 192))
|
38 |
label = gr.outputs.Label()
|
39 |
-
|
|
|
40 |
|
41 |
# Cell
|
42 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
import timm
|
4 |
import dill
|
5 |
+
import os
|
6 |
|
7 |
+
learn = load_learner('./models/catan-model-paperspace-5.pkl', pickle_module=dill)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# learn = load_learner('catan-model.pkl', pickle_module=dill)
|
9 |
|
|
|
10 |
# categories = learn.dls.vocab
|
11 |
categories = ('Not Catan', 'Catan')
|
12 |
|
|
|
19 |
# Cell
|
20 |
image = gr.inputs.Image(shape=(192, 192))
|
21 |
label = gr.outputs.Label()
|
22 |
+
examples_dir_path = './examples/'
|
23 |
+
examples = [(examples_dir_path + filename) for filename in os.listdir(examples_dir_path) if filename[:1] != '.']
|
24 |
|
25 |
# Cell
|
26 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
board-game-catan-IMG_4671.jpg
DELETED
Binary file (738 kB)
|
|
examples/Hotdog - Hot_dog_with_mustard.png
ADDED
Git LFS Details
|
examples/board-game-catan-IMG_4671.jpg
ADDED
Git LFS Details
|
examples/josh-at-reggie-wedding.jpeg
ADDED
Git LFS Details
|
examples/photo-of-macbook-catan-IMG_4817.jpg
ADDED
Git LFS Details
|
models/catan-model-paperspace-5.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c8d90b3d3a5dda33b8656170ad1f764081673a78bc7b89421129938fde68ed0
|
3 |
+
size 87464303
|
photo-of-macbook-catan-IMG_4817.jpg
DELETED
Binary file (591 kB)
|
|