Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadd debugging code
app.py
CHANGED
@@ -5,11 +5,12 @@ learn = load_learner('watersports.pkl')
|
|
5 |
categories = learn.dls.vocab
|
6 |
|
7 |
def classify_image(img):
|
|
|
8 |
pred,idx,probs = learn.predict(img)
|
9 |
return( dict(zip(categories, map(float,probs))))
|
10 |
|
11 |
-
title = "Which Watersport?
|
12 |
-
description = "Drag an image into the classifier. Take a close look and guess it yourself, before hitting **\<Submit\>**. \n \
|
13 |
You need to **\<Clear\>** before dragging next image. Other images can be dragged directly from google search."
|
14 |
image = gr.inputs.Image(shape=(192,192))
|
15 |
label = gr.outputs.Label()
|
|
|
5 |
categories = learn.dls.vocab
|
6 |
|
7 |
def classify_image(img):
|
8 |
+
print('Classifying ')
|
9 |
pred,idx,probs = learn.predict(img)
|
10 |
return( dict(zip(categories, map(float,probs))))
|
11 |
|
12 |
+
title = "Which Watersport? Compare your guess to the machine inferencing."
|
13 |
+
description = "CLick an image and click submit. Drag an image into the classifier. Take a close look and guess it yourself, before hitting **\<Submit\>**. \n \
|
14 |
You need to **\<Clear\>** before dragging next image. Other images can be dragged directly from google search."
|
15 |
image = gr.inputs.Image(shape=(192,192))
|
16 |
label = gr.outputs.Label()
|