Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ labels = learn.dls.vocab
|
|
8 |
def predict(img):
|
9 |
img = PILImage.create(img)
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
-
return
|
12 |
|
13 |
title = "Calligraphy Classifier"
|
14 |
description = "A calligraphy type classifer was trained with fastai. Please note that this classifier is currnetly limited to Naskh and Nastaligh."
|
|
|
8 |
def predict(img):
|
9 |
img = PILImage.create(img)
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
11 |
+
return dic(zip(categories, map(float,porbs)))
|
12 |
|
13 |
title = "Calligraphy Classifier"
|
14 |
description = "A calligraphy type classifer was trained with fastai. Please note that this classifier is currnetly limited to Naskh and Nastaligh."
|