Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update SDG classifier
authored
Mar 10, 2025
by
Ioanna Mandilara
Show whitespace changes
Inline
Side-by-side
SDG-classifier.md
View page @
a5336ec5
...
@@ -53,7 +53,7 @@ text = ['Europe has always been the home of industry. For centuries, it has been
...
@@ -53,7 +53,7 @@ text = ['Europe has always been the home of industry. For centuries, it has been
```
python
```
python
from
SDGDetector
import
SDGDetector
from
SDGDetector
import
SDGDetector
combo
=
SDGDetector
.
SDG_classifier
(
pretrained_model_name
=
'
XLNet
'
,
combo
=
SDGDetector
.
SDG_classifier
(
pretrained_model_name
=
'
XLNet
'
,
pretrained_model_path
=<
the
path
of
downloaded
model
>
,
sentence_model_name
=
'
all-mpnet-base-v2
'
,
top_keywords
=
10
,
diversity
=
0.3
,
n_gram_range
=
(
1
,
2
))
sentence_model_name
=
'
all-mpnet-base-v2
'
,
top_keywords
=
10
,
diversity
=
0.3
,
n_gram_range
=
(
1
,
2
))
sdg
,
sdg_name
,
association
=
combo
.
predict
(
text
,
return_association
=
True
)
sdg
,
sdg_name
,
association
=
combo
.
predict
(
text
,
return_association
=
True
)
...
...
...
...