Views
No views yet
1
2# Use a pipeline as a high-level helper
3from transformers import pipeline
4
5pipe = pipeline("text-classification", model="kaixkhazaki/multilingual-e5-doclaynet")
6
7prediction = pipe("This is some text from a financial report")
8print(prediction)1{
2 'financial_reports': 0,
3 'government_tenders': 1,
4 'laws_and_regulations': 2,
5 'manuals': 3,
6 'patents': 4,
7 'scientific_articles': 5
8}1{
2 'batch_size': 8,
3 'num_epochs': 10,
4 'learning_rate': 2e-5,
5 'weight_decay': 0.01,
6 'warmup_ratio': 0.1,
7 'gradient_clip': 1.0,
8 'label_smoothing': 0.1,
9 'optimizer': 'AdamW',
10 'scheduler': 'cosine_with_warmup'
11}