Spaces:
Sleeping
Sleeping
Update utils/vulnerability_classifier.py
Browse files
utils/vulnerability_classifier.py
CHANGED
|
@@ -29,6 +29,12 @@ label_dict= {0: 'Agricultural communities',
|
|
| 29 |
17: 'Women and other genders'}
|
| 30 |
|
| 31 |
def getlabels(preds):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Get label names
|
| 33 |
preds_list = preds.tolist()
|
| 34 |
|
|
|
|
| 29 |
17: 'Women and other genders'}
|
| 30 |
|
| 31 |
def getlabels(preds):
|
| 32 |
+
|
| 33 |
+
"""
|
| 34 |
+
Function that takes the numerical predictions as an input and returns a list of the labels.
|
| 35 |
+
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
# Get label names
|
| 39 |
preds_list = preds.tolist()
|
| 40 |
|