Spaces:
Sleeping
Sleeping
MikeTrizna
commited on
Commit
•
ee6d3b9
1
Parent(s):
4dd23d4
Fixed class labels
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ from huggingface_hub import from_pretrained_fastai
|
|
5 |
learn_imp = from_pretrained_fastai('MikeTrizna/Prunus_lineage_classifier')
|
6 |
|
7 |
def predict(image_np, description=None):
|
8 |
-
classes = ['
|
9 |
-
'
|
10 |
pred,pred_idx,probs = learn_imp.predict(image_np)
|
11 |
confidences = {classes[idx]: f'{prob:.04f}' for idx, prob in enumerate(probs)}
|
12 |
return confidences
|
|
|
5 |
learn_imp = from_pretrained_fastai('MikeTrizna/Prunus_lineage_classifier')
|
6 |
|
7 |
def predict(image_np, description=None):
|
8 |
+
classes = ['Neotropical racemose', 'Paleotropical racemose',
|
9 |
+
'Solitary/Corymbose', 'Temperate racemose']
|
10 |
pred,pred_idx,probs = learn_imp.predict(image_np)
|
11 |
confidences = {classes[idx]: f'{prob:.04f}' for idx, prob in enumerate(probs)}
|
12 |
return confidences
|