Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,6 @@ id2label = config["id2label"]
|
|
| 47 |
label2id = config["label2id"]
|
| 48 |
image_size = config["image_size"]
|
| 49 |
classes_names = list(label2id.keys())
|
| 50 |
-
print(id2label)
|
| 51 |
'''
|
| 52 |
# import labels
|
| 53 |
classes_names = ["Acropore_branched", "Acropore_digitised", "Acropore_tabular", "Algae_assembly",
|
|
@@ -77,7 +76,7 @@ def predict(input_image):
|
|
| 77 |
result = {}
|
| 78 |
i = 0
|
| 79 |
for score in scores:
|
| 80 |
-
label =
|
| 81 |
result[label] = float(score)
|
| 82 |
i += 1
|
| 83 |
result = {key: result[key] for key in result if result[key] > 0.5}
|
|
|
|
| 47 |
label2id = config["label2id"]
|
| 48 |
image_size = config["image_size"]
|
| 49 |
classes_names = list(label2id.keys())
|
|
|
|
| 50 |
'''
|
| 51 |
# import labels
|
| 52 |
classes_names = ["Acropore_branched", "Acropore_digitised", "Acropore_tabular", "Algae_assembly",
|
|
|
|
| 76 |
result = {}
|
| 77 |
i = 0
|
| 78 |
for score in scores:
|
| 79 |
+
label = classes_names[i]
|
| 80 |
result[label] = float(score)
|
| 81 |
i += 1
|
| 82 |
result = {key: result[key] for key in result if result[key] > 0.5}
|