Instructions to use Sunbird/sunflower_language_classification_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sunbird/sunflower_language_classification_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sunbird/sunflower_language_classification_v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sunbird/sunflower_language_classification_v2") model = AutoModelForSequenceClassification.from_pretrained("Sunbird/sunflower_language_classification_v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,070 Bytes
76e7518 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | {
"label2id": {
"ach": 0,
"adh": 1,
"afr": 2,
"aka": 3,
"alz": 4,
"amh": 5,
"bam": 6,
"bem": 7,
"bfa": 8,
"cgg": 9,
"dag": 10,
"din": 11,
"eng": 12,
"ewe": 13,
"fra": 14,
"ful": 15,
"gwr": 16,
"hau": 17,
"ibo": 18,
"kab": 19,
"kau": 20,
"kdi": 21,
"kdj": 22,
"keo": 23,
"kik": 24,
"kin": 25,
"koo": 26,
"kpz": 27,
"laj": 28,
"lgg": 29,
"lin": 30,
"lsm": 31,
"luc": 32,
"lug": 33,
"luo": 34,
"luy": 35,
"mhi": 36,
"mlg": 37,
"myx": 38,
"nbl": 39,
"nuj": 40,
"nya": 41,
"nyn": 42,
"nyo": 43,
"orm": 44,
"pcm": 45,
"pok": 46,
"rub": 47,
"ruc": 48,
"run": 49,
"rwm": 50,
"sna": 51,
"som": 52,
"sot": 53,
"swa": 54,
"teo": 55,
"tlj": 56,
"tsn": 57,
"ttj": 58,
"wol": 59,
"xho": 60,
"xog": 61,
"yor": 62,
"zul": 63
},
"id2label": {
"0": "ach",
"1": "adh",
"2": "afr",
"3": "aka",
"4": "alz",
"5": "amh",
"6": "bam",
"7": "bem",
"8": "bfa",
"9": "cgg",
"10": "dag",
"11": "din",
"12": "eng",
"13": "ewe",
"14": "fra",
"15": "ful",
"16": "gwr",
"17": "hau",
"18": "ibo",
"19": "kab",
"20": "kau",
"21": "kdi",
"22": "kdj",
"23": "keo",
"24": "kik",
"25": "kin",
"26": "koo",
"27": "kpz",
"28": "laj",
"29": "lgg",
"30": "lin",
"31": "lsm",
"32": "luc",
"33": "lug",
"34": "luo",
"35": "luy",
"36": "mhi",
"37": "mlg",
"38": "myx",
"39": "nbl",
"40": "nuj",
"41": "nya",
"42": "nyn",
"43": "nyo",
"44": "orm",
"45": "pcm",
"46": "pok",
"47": "rub",
"48": "ruc",
"49": "run",
"50": "rwm",
"51": "sna",
"52": "som",
"53": "sot",
"54": "swa",
"55": "teo",
"56": "tlj",
"57": "tsn",
"58": "ttj",
"59": "wol",
"60": "xho",
"61": "xog",
"62": "yor",
"63": "zul"
}
} |