from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
pipe = pipeline(
model="poltextlab/xlm-roberta-large-pooled-cap-media2-v2",
task="text-classification",
tokenizer=tokenizer,
token="<your_hf_read_only_token>"
)
text = "Tapenade, when combined with chopped tomatoes and basil, makes for one of the best simple summer dishes in existence."
pipe(text)
Gated access
Due to the gated access, you must pass the
token
parameter when loading the model. In earlier versions of the Transformers package, you may need to use the
use_auth_token
parameter instead.
Model performance
The model was evaluated on a test set of 67,681 english examples.
Accuracy:
0.8
.
Precision:
0.8
.
Recall:
0.8
Weighted Average F1-score:
0.8
Label
precision
recall
f1-score
support
Macroeconomics (1)
0.72
0.73
0.72
2471
Civil Rights (2)
0.7
0.68
0.69
1886
Health (3)
0.82
0.83
0.83
2471
Agriculture (4)
0.77
0.78
0.77
811
Labor (5)
0.74
0.7
0.72
1277
Education (6)
0.86
0.88
0.87
2080
Environment (7)
0.77
0.8
0.78
1283
Energy (8)
0.8
0.83
0.81
1370
Immigration (9)
0.73
0.79
0.76
514
Transportation (10)
0.81
0.81
0.81
2375
Law and Crime (12)
0.71
0.69
0.7
2471
Social Welfare (13)
0.66
0.67
0.67
683
Housing (14)
0.72
0.72
0.72
1023
Banking, Finance, and Domestic Commerce (15)
0.72
0.69
0.71
2471
Defense (16)
0.76
0.78
0.77
2471
Technology (17)
0.73
0.75
0.74
1375
Foreign Trade (18)
0.7
0.66
0.68
533
International Affairs (19)
0.69
0.67
0.68
2471
Government Operations (20)
0.72
0.66
0.69
2507
Public Lands (21)
0.64
0.66
0.65
554
Culture (23)
0.74
0.76
0.75
2142
State and Local Government Administration (24)
0.6
0.67
0.63
81
Weather (25)
0.8
0.72
0.76
39
Fires, emergencies and natural disasters (26)
0.96
0.97
0.97
2471
Crime and trials (27)
0.69
0.88
0.78
293
Arts, culture, entertainment and history (28)
0.78
0.77
0.77
2265
Style and fashion (29)
0.81
0.69
0.74
2389
Food (30)
0.79
0.84
0.81
2168
Travel (31)
0.8
0.87
0.83
1999
Wellbeing and learning (32)
0.75
0.78
0.77
1963
Personal finance and real estate (33)
0.86
0.85
0.86
2222
Personal technology and popular science (34)
0.81
0.81
0.81
2054
Churches and Religion (35)
0.7
0.62
0.66
74
Celebrities and human interest (36)
0.69
0.75
0.72
1109
Obituaries and death notices (37)
0.74
0.86
0.79
521
Sports (38)
0.92
0.92
0.92
2220
Crosswords, puzzles, comics (39)
0
0
0
7
Media production/internal, letters (40)
0.91
0.92
0.91
763
Advertisements (41)
1
0.99
0.99
7333
No Policy and No Media Content (998)
0.83
0.78
0.8
2471
Inference platform
This model is used by the
CAP Babel Machine
, an open-source and free natural language processing tool, designed to simplify and speed up projects for comparative research.
Cooperation
Model performance can be significantly improved by extending our training sets. We appreciate every submission of CAP-coded corpora (of any domain and language) at poltextlab{at}poltextlab{dot}com or by using the
CAP Babel Machine
.
Debugging and issues
This architecture uses the
sentencepiece
tokenizer. In order to run the model before
transformers==4.27
you need to install it manually.
If you encounter a
RuntimeError
when loading the model using the
from_pretrained()
method, adding
ignore_mismatched_sizes=True
should solve the issue.
Runs of poltextlab xlm-roberta-large-pooled-cap-media2-v2 on huggingface.co
1.2K
Total runs
0
24-hour runs
0
3-day runs
8
7-day runs
75
30-day runs
More Information About xlm-roberta-large-pooled-cap-media2-v2 huggingface.co Model
More xlm-roberta-large-pooled-cap-media2-v2 license Visit here:
xlm-roberta-large-pooled-cap-media2-v2 huggingface.co is an AI model on huggingface.co that provides xlm-roberta-large-pooled-cap-media2-v2's model effect (), which can be used instantly with this poltextlab xlm-roberta-large-pooled-cap-media2-v2 model. huggingface.co supports a free trial of the xlm-roberta-large-pooled-cap-media2-v2 model, and also provides paid use of the xlm-roberta-large-pooled-cap-media2-v2. Support call xlm-roberta-large-pooled-cap-media2-v2 model through api, including Node.js, Python, http.
xlm-roberta-large-pooled-cap-media2-v2 huggingface.co is an online trial and call api platform, which integrates xlm-roberta-large-pooled-cap-media2-v2's modeling effects, including api services, and provides a free online trial of xlm-roberta-large-pooled-cap-media2-v2, you can try xlm-roberta-large-pooled-cap-media2-v2 online for free by clicking the link below.
poltextlab xlm-roberta-large-pooled-cap-media2-v2 online free url in huggingface.co:
xlm-roberta-large-pooled-cap-media2-v2 is an open source model from GitHub that offers a free installation service, and any user can find xlm-roberta-large-pooled-cap-media2-v2 on GitHub to install. At the same time, huggingface.co provides the effect of xlm-roberta-large-pooled-cap-media2-v2 install, users can directly use xlm-roberta-large-pooled-cap-media2-v2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
xlm-roberta-large-pooled-cap-media2-v2 install url in huggingface.co: