Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,8 @@ def predict(image_path):
|
|
25 |
|
26 |
|
27 |
def show_likelihood(pred_label):
|
28 |
-
class_probs = pred_label[
|
29 |
-
classes = [
|
30 |
class_labels = [classes[i] for i in range(len(class_probs))]
|
31 |
fig = pt.figure(figsize=(10, 10))
|
32 |
pt.barh(class_labels, class_probs)
|
|
|
25 |
|
26 |
|
27 |
def show_likelihood(pred_label):
|
28 |
+
class_probs = pred_label[9].numpy()
|
29 |
+
classes = pred_label[9]
|
30 |
class_labels = [classes[i] for i in range(len(class_probs))]
|
31 |
fig = pt.figure(figsize=(10, 10))
|
32 |
pt.barh(class_labels, class_probs)
|