Views
No views yet
1{
2 "0": "0: No Impact",
3 "1": "SDG 1: No Poverty",
4 "2": "SDG 2: Zero Hunger",
5 "3": "SDG 3: Good Health and Well-being",
6 "4": "SDG 4: Quality Education",
7 "5": "SDG 5: Gender Equality",
8 "6": "SDG 6: Clean Water and Sanitation",
9 "7": "SDG 7: Affordable and Clean Energy",
10 "8": "SDG 8: Decent Work and Economic Growth",
11 "9": "SDG 9: Industry, Innovation and Infrastructure",
12 "10": "SDG 10: Reduced Inequality",
13 "11": "SDG 11: Sustainable Cities and Communities",
14 "12": "SDG 12: Responsible Consumption and Production",
15 "13": "SDG 13: Climate Action",
16 "14": "SDG 14: Life Below Water",
17 "15": "SDG 15: Life on Land",
18 "16": "SDG 16: Peace and Justice Strong Institutions",
19 "17": "SDG 17: Partnerships to achieve the Goal"
20}1from transformers import pipeline
2
3# Load the classifier
4classifier = pipeline("text-classification", model="amannor/bert-base-uncased-sdgclassifier")
5
6# Example description
7text = "Our company develops innovative, low-cost solar panels to bring electricity to rural communities."
8
9# Get prediction
10result = classifier(text)
11print(result)
12# [{'label': 'SDG 7: Affordable and Clean Energy', 'score': 0.98...}]
13
14# Example of a non-impact startup
15text_2 = "We are a B2B platform for optimizing advertising spend on social media."
16result_2 = classifier(text_2)
17print(result_2)
18# [{'label': '0: No Impact', 'score': 0.95...}]| Task | F1-Weighted |
|---|---|
| 18-Label (Full) | 0.79 |
| 6-Label (5Ps) | 0.836 |