JelenaBickovska
commited on
Commit
•
8edb67e
1
Parent(s):
ef3f139
test wood furnishing
Browse files- 20230321_wood_furnishes_34_10ep_22er_good.pkl +3 -0
- app.py +3 -3
- glass.webp +0 -0
- goldleaf.jpeg +0 -0
- lightwood.webp +0 -0
- marble.webp +0 -0
- oiledbronze.jpeg +0 -0
- rattan.webp +0 -0
- silverleaf.jpeg +0 -0
- stainlesssteel.jpeg +0 -0
20230321_wood_furnishes_34_10ep_22er_good.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63c5356cde93f474f12204c25ce071dcc0f12f318f6ce1273e0087ace064a0fd
|
3 |
+
size 88249899
|
app.py
CHANGED
@@ -7,18 +7,18 @@ import numpy as np
|
|
7 |
|
8 |
def is_cat(x): return x[0].isupper()
|
9 |
|
10 |
-
learn = load_learner('
|
11 |
|
12 |
#categories = ('cool-colors', 'earth-tones', 'jewel', 'neutral-colors', 'pastel', 'warm-colors')
|
13 |
|
14 |
-
categories = ('
|
15 |
def classify_image(img):
|
16 |
pred, idx, probs = learn.predict(img)
|
17 |
return dict(zip(categories, map(float, probs)))
|
18 |
|
19 |
image = gr.inputs.Image(shape=(192,192))
|
20 |
label = gr.outputs.Label()
|
21 |
-
examples = ['
|
22 |
|
23 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
24 |
|
|
|
7 |
|
8 |
def is_cat(x): return x[0].isupper()
|
9 |
|
10 |
+
learn = load_learner('20230321_wood_furnishes_34_10ep_22er_good.pkl')
|
11 |
|
12 |
#categories = ('cool-colors', 'earth-tones', 'jewel', 'neutral-colors', 'pastel', 'warm-colors')
|
13 |
|
14 |
+
categories = ('blackstain', 'brass', 'brushednickel', 'chinoiserie', 'chrome', 'copper', 'darkwood', 'glass', 'goldleaf', 'lightwood', 'marble', 'oiledbronze', 'rattan', 'silverleaf', 'stainlesssteel')
|
15 |
def classify_image(img):
|
16 |
pred, idx, probs = learn.predict(img)
|
17 |
return dict(zip(categories, map(float, probs)))
|
18 |
|
19 |
image = gr.inputs.Image(shape=(192,192))
|
20 |
label = gr.outputs.Label()
|
21 |
+
examples = ['glass.webp', 'goldleaf.jpeg', 'lightwood.webp', 'oiledbronze.jpeg']
|
22 |
|
23 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
24 |
|
glass.webp
ADDED
goldleaf.jpeg
ADDED
lightwood.webp
ADDED
marble.webp
ADDED
oiledbronze.jpeg
ADDED
rattan.webp
ADDED
silverleaf.jpeg
ADDED
stainlesssteel.jpeg
ADDED