onisj commited on
Commit
c4e0d8b
·
verified ·
1 Parent(s): 5a3ea74

Delete intent_classifier

Browse files
intent_classifier/config.json DELETED
@@ -1,785 +0,0 @@
1
- {
2
- "_name_or_path": "bert-base-uncased",
3
- "architectures": [
4
- "BertForSequenceClassification"
5
- ],
6
- "attention_probs_dropout_prob": 0.1,
7
- "classifier_dropout": null,
8
- "gradient_checkpointing": false,
9
- "hidden_act": "gelu",
10
- "hidden_dropout_prob": 0.1,
11
- "hidden_size": 768,
12
- "id2label": {
13
- "0": "about",
14
- "1": "acceptance",
15
- "2": "accepting_flaws",
16
- "3": "accepting_help",
17
- "4": "adoration",
18
- "5": "afternoon",
19
- "6": "agitation",
20
- "7": "alienation",
21
- "8": "amazement",
22
- "9": "ambivalence",
23
- "10": "amusement",
24
- "11": "anger",
25
- "12": "anger_management",
26
- "13": "anguish",
27
- "14": "annoyance",
28
- "15": "anticipation",
29
- "16": "anxiety",
30
- "17": "anxiety_management",
31
- "18": "anxiety_triggers",
32
- "19": "anxious",
33
- "20": "apathy",
34
- "21": "appreciation",
35
- "22": "arousal",
36
- "23": "ask",
37
- "24": "betrayal",
38
- "25": "bitterness",
39
- "26": "bliss",
40
- "27": "boredom",
41
- "28": "boundary_setting",
42
- "29": "breaking_bad_habits",
43
- "30": "breaking_the_cycle",
44
- "31": "building_courage",
45
- "32": "building_resilience",
46
- "33": "building_self_worth",
47
- "34": "calm_heart",
48
- "35": "calm_mind",
49
- "36": "calmness",
50
- "37": "casual",
51
- "38": "changing_perspectives",
52
- "39": "checking_in",
53
- "40": "chronic_stress",
54
- "41": "comforting_words",
55
- "42": "confidence",
56
- "43": "confidence_boosting",
57
- "44": "confusion",
58
- "45": "coping",
59
- "46": "coping_mechanisms",
60
- "47": "coping_with_anger",
61
- "48": "coping_with_change",
62
- "49": "courage",
63
- "50": "creating",
64
- "51": "creation",
65
- "52": "curiosity",
66
- "53": "dealing_with_doubts",
67
- "54": "dealing_with_failure",
68
- "55": "dealing_with_regret",
69
- "56": "death",
70
- "57": "default",
71
- "58": "defeat",
72
- "59": "delight",
73
- "60": "depressed",
74
- "61": "depression",
75
- "62": "depression_management",
76
- "63": "despair",
77
- "64": "desperation",
78
- "65": "determination",
79
- "66": "devastation",
80
- "67": "disappointment",
81
- "68": "discomfort",
82
- "69": "disgust",
83
- "70": "dismay",
84
- "71": "distraction_techniques",
85
- "72": "done",
86
- "73": "doubts_and_fears",
87
- "74": "dread",
88
- "75": "eagerness",
89
- "76": "elation",
90
- "77": "embracing_change",
91
- "78": "emotional_balance",
92
- "79": "emotional_boundaries",
93
- "80": "emotional_regulation",
94
- "81": "emotional_support",
95
- "82": "empathy",
96
- "83": "encouragement",
97
- "84": "envy",
98
- "85": "euphoria",
99
- "86": "evening",
100
- "87": "excitement",
101
- "88": "exercise_for_mood",
102
- "89": "exhaustion",
103
- "90": "fact-1",
104
- "91": "fact-10",
105
- "92": "fact-100",
106
- "93": "fact-101",
107
- "94": "fact-102",
108
- "95": "fact-103",
109
- "96": "fact-104",
110
- "97": "fact-105",
111
- "98": "fact-106",
112
- "99": "fact-107",
113
- "100": "fact-108",
114
- "101": "fact-109",
115
- "102": "fact-11",
116
- "103": "fact-110",
117
- "104": "fact-111",
118
- "105": "fact-112",
119
- "106": "fact-113",
120
- "107": "fact-114",
121
- "108": "fact-115",
122
- "109": "fact-116",
123
- "110": "fact-117",
124
- "111": "fact-118",
125
- "112": "fact-119",
126
- "113": "fact-12",
127
- "114": "fact-120",
128
- "115": "fact-121",
129
- "116": "fact-122",
130
- "117": "fact-123",
131
- "118": "fact-124",
132
- "119": "fact-125",
133
- "120": "fact-126",
134
- "121": "fact-127",
135
- "122": "fact-128",
136
- "123": "fact-129",
137
- "124": "fact-13",
138
- "125": "fact-130",
139
- "126": "fact-131",
140
- "127": "fact-132",
141
- "128": "fact-133",
142
- "129": "fact-134",
143
- "130": "fact-135",
144
- "131": "fact-136",
145
- "132": "fact-137",
146
- "133": "fact-138",
147
- "134": "fact-139",
148
- "135": "fact-14",
149
- "136": "fact-140",
150
- "137": "fact-141",
151
- "138": "fact-142",
152
- "139": "fact-143",
153
- "140": "fact-144",
154
- "141": "fact-145",
155
- "142": "fact-146",
156
- "143": "fact-15",
157
- "144": "fact-16",
158
- "145": "fact-17",
159
- "146": "fact-18",
160
- "147": "fact-19",
161
- "148": "fact-2",
162
- "149": "fact-20",
163
- "150": "fact-21",
164
- "151": "fact-22",
165
- "152": "fact-23",
166
- "153": "fact-24",
167
- "154": "fact-25",
168
- "155": "fact-26",
169
- "156": "fact-27",
170
- "157": "fact-28",
171
- "158": "fact-29",
172
- "159": "fact-3",
173
- "160": "fact-30",
174
- "161": "fact-31",
175
- "162": "fact-32",
176
- "163": "fact-33",
177
- "164": "fact-34",
178
- "165": "fact-35",
179
- "166": "fact-36",
180
- "167": "fact-37",
181
- "168": "fact-38",
182
- "169": "fact-39",
183
- "170": "fact-40",
184
- "171": "fact-41",
185
- "172": "fact-42",
186
- "173": "fact-43",
187
- "174": "fact-44",
188
- "175": "fact-45",
189
- "176": "fact-46",
190
- "177": "fact-47",
191
- "178": "fact-48",
192
- "179": "fact-49",
193
- "180": "fact-5",
194
- "181": "fact-50",
195
- "182": "fact-51",
196
- "183": "fact-52",
197
- "184": "fact-53",
198
- "185": "fact-54",
199
- "186": "fact-55",
200
- "187": "fact-56",
201
- "188": "fact-57",
202
- "189": "fact-58",
203
- "190": "fact-59",
204
- "191": "fact-6",
205
- "192": "fact-60",
206
- "193": "fact-61",
207
- "194": "fact-62",
208
- "195": "fact-63",
209
- "196": "fact-64",
210
- "197": "fact-65",
211
- "198": "fact-66",
212
- "199": "fact-67",
213
- "200": "fact-68",
214
- "201": "fact-69",
215
- "202": "fact-7",
216
- "203": "fact-70",
217
- "204": "fact-71",
218
- "205": "fact-72",
219
- "206": "fact-73",
220
- "207": "fact-74",
221
- "208": "fact-75",
222
- "209": "fact-76",
223
- "210": "fact-77",
224
- "211": "fact-78",
225
- "212": "fact-79",
226
- "213": "fact-8",
227
- "214": "fact-80",
228
- "215": "fact-81",
229
- "216": "fact-82",
230
- "217": "fact-83",
231
- "218": "fact-84",
232
- "219": "fact-85",
233
- "220": "fact-86",
234
- "221": "fact-87",
235
- "222": "fact-88",
236
- "223": "fact-89",
237
- "224": "fact-9",
238
- "225": "fact-90",
239
- "226": "fact-91",
240
- "227": "fact-92",
241
- "228": "fact-93",
242
- "229": "fact-94",
243
- "230": "fact-95",
244
- "231": "fact-96",
245
- "232": "fact-97",
246
- "233": "fact-98",
247
- "234": "fact-99",
248
- "235": "fear",
249
- "236": "feeling_better",
250
- "237": "feeling_burned_out",
251
- "238": "feeling_connected",
252
- "239": "feeling_exhausted",
253
- "240": "feeling_helpless",
254
- "241": "feeling_hopeless",
255
- "242": "feeling_rejected",
256
- "243": "feeling_strong",
257
- "244": "feeling_unworthy",
258
- "245": "feeling_weak",
259
- "246": "finding_inner_peace",
260
- "247": "finding_purpose",
261
- "248": "forgiveness",
262
- "249": "forgiving_oneself",
263
- "250": "friends",
264
- "251": "frustration",
265
- "252": "goal_setting",
266
- "253": "goodbye",
267
- "254": "gratitude",
268
- "255": "gratitude_practice",
269
- "256": "greeting",
270
- "257": "grief",
271
- "258": "guided_meditation",
272
- "259": "guilt",
273
- "260": "happy",
274
- "261": "hate-me",
275
- "262": "hate-you",
276
- "263": "healing",
277
- "264": "healing_wounds",
278
- "265": "help",
279
- "266": "help_seeking",
280
- "267": "hope",
281
- "268": "hope_for_the_future",
282
- "269": "hope_in_the_dark",
283
- "270": "hopelessness",
284
- "271": "improving_mental_health",
285
- "272": "inner_peace",
286
- "273": "inner_strength",
287
- "274": "insecurity",
288
- "275": "irritation",
289
- "276": "jokes",
290
- "277": "joy",
291
- "278": "learn-mental-health",
292
- "279": "learn-more",
293
- "280": "learning_from_mistakes",
294
- "281": "letting_go",
295
- "282": "letting_go_of_anger",
296
- "283": "letting_others_in",
297
- "284": "life_motivation",
298
- "285": "lifestyle_changes",
299
- "286": "listening",
300
- "287": "location",
301
- "288": "loneliness",
302
- "289": "loss",
303
- "290": "love",
304
- "291": "meditation",
305
- "292": "mental-health-fact",
306
- "293": "mental_clarity",
307
- "294": "mental_fatigue",
308
- "295": "mental_health_checkin",
309
- "296": "mental_health_day",
310
- "297": "mental_health_resources",
311
- "298": "mental_health_stigma",
312
- "299": "mind_over_matter",
313
- "300": "mindful_eating",
314
- "301": "mindfulness",
315
- "302": "morning",
316
- "303": "motivation",
317
- "304": "name",
318
- "305": "neutral-response",
319
- "306": "night",
320
- "307": "no-approach",
321
- "308": "no-response",
322
- "309": "nostalgia",
323
- "310": "not-talking",
324
- "311": "overcoming_fear",
325
- "312": "overcoming_obstacles",
326
- "313": "overwhelmed",
327
- "314": "pandora-useful",
328
- "315": "panic",
329
- "316": "personal_boundaries",
330
- "317": "personal_growth",
331
- "318": "positive_affirmation",
332
- "319": "pride",
333
- "320": "problem",
334
- "321": "procrastination",
335
- "322": "productivity",
336
- "323": "progress_not_perfection",
337
- "324": "reassurance",
338
- "325": "recovery_process",
339
- "326": "regret",
340
- "327": "relationship_advice",
341
- "328": "relaxation_techniques",
342
- "329": "relief",
343
- "330": "repeat",
344
- "331": "resentment",
345
- "332": "resilience_building",
346
- "333": "sad",
347
- "334": "satisfaction",
348
- "335": "scared",
349
- "336": "self-esteem",
350
- "337": "self_acceptance",
351
- "338": "self_awareness",
352
- "339": "self_care",
353
- "340": "self_compassion",
354
- "341": "self_doubt",
355
- "342": "self_esteem",
356
- "343": "self_improvement",
357
- "344": "self_love",
358
- "345": "self_reflection",
359
- "346": "self_trust",
360
- "347": "shame",
361
- "348": "skill",
362
- "349": "sleep",
363
- "350": "social_isolation",
364
- "351": "something-else",
365
- "352": "stress_management",
366
- "353": "stress_relief",
367
- "354": "stressed",
368
- "355": "struggling_with_life",
369
- "356": "stupid",
370
- "357": "suicide",
371
- "358": "surprise",
372
- "359": "talking_about_emotions",
373
- "360": "talking_about_feelings",
374
- "361": "talking_about_stress",
375
- "362": "talking_about_the_past",
376
- "363": "thanks",
377
- "364": "therapy_techniques",
378
- "365": "thought_reframing",
379
- "366": "time_management",
380
- "367": "trauma",
381
- "368": "trust",
382
- "369": "trust_issues",
383
- "370": "understand",
384
- "371": "user-advice",
385
- "372": "user-agree",
386
- "373": "user-meditation",
387
- "374": "who are you",
388
- "375": "worthless",
389
- "376": "wrong"
390
- },
391
- "initializer_range": 0.02,
392
- "intermediate_size": 3072,
393
- "label2id": {
394
- "about": 0,
395
- "acceptance": 1,
396
- "accepting_flaws": 2,
397
- "accepting_help": 3,
398
- "adoration": 4,
399
- "afternoon": 5,
400
- "agitation": 6,
401
- "alienation": 7,
402
- "amazement": 8,
403
- "ambivalence": 9,
404
- "amusement": 10,
405
- "anger": 11,
406
- "anger_management": 12,
407
- "anguish": 13,
408
- "annoyance": 14,
409
- "anticipation": 15,
410
- "anxiety": 16,
411
- "anxiety_management": 17,
412
- "anxiety_triggers": 18,
413
- "anxious": 19,
414
- "apathy": 20,
415
- "appreciation": 21,
416
- "arousal": 22,
417
- "ask": 23,
418
- "betrayal": 24,
419
- "bitterness": 25,
420
- "bliss": 26,
421
- "boredom": 27,
422
- "boundary_setting": 28,
423
- "breaking_bad_habits": 29,
424
- "breaking_the_cycle": 30,
425
- "building_courage": 31,
426
- "building_resilience": 32,
427
- "building_self_worth": 33,
428
- "calm_heart": 34,
429
- "calm_mind": 35,
430
- "calmness": 36,
431
- "casual": 37,
432
- "changing_perspectives": 38,
433
- "checking_in": 39,
434
- "chronic_stress": 40,
435
- "comforting_words": 41,
436
- "confidence": 42,
437
- "confidence_boosting": 43,
438
- "confusion": 44,
439
- "coping": 45,
440
- "coping_mechanisms": 46,
441
- "coping_with_anger": 47,
442
- "coping_with_change": 48,
443
- "courage": 49,
444
- "creating": 50,
445
- "creation": 51,
446
- "curiosity": 52,
447
- "dealing_with_doubts": 53,
448
- "dealing_with_failure": 54,
449
- "dealing_with_regret": 55,
450
- "death": 56,
451
- "default": 57,
452
- "defeat": 58,
453
- "delight": 59,
454
- "depressed": 60,
455
- "depression": 61,
456
- "depression_management": 62,
457
- "despair": 63,
458
- "desperation": 64,
459
- "determination": 65,
460
- "devastation": 66,
461
- "disappointment": 67,
462
- "discomfort": 68,
463
- "disgust": 69,
464
- "dismay": 70,
465
- "distraction_techniques": 71,
466
- "done": 72,
467
- "doubts_and_fears": 73,
468
- "dread": 74,
469
- "eagerness": 75,
470
- "elation": 76,
471
- "embracing_change": 77,
472
- "emotional_balance": 78,
473
- "emotional_boundaries": 79,
474
- "emotional_regulation": 80,
475
- "emotional_support": 81,
476
- "empathy": 82,
477
- "encouragement": 83,
478
- "envy": 84,
479
- "euphoria": 85,
480
- "evening": 86,
481
- "excitement": 87,
482
- "exercise_for_mood": 88,
483
- "exhaustion": 89,
484
- "fact-1": 90,
485
- "fact-10": 91,
486
- "fact-100": 92,
487
- "fact-101": 93,
488
- "fact-102": 94,
489
- "fact-103": 95,
490
- "fact-104": 96,
491
- "fact-105": 97,
492
- "fact-106": 98,
493
- "fact-107": 99,
494
- "fact-108": 100,
495
- "fact-109": 101,
496
- "fact-11": 102,
497
- "fact-110": 103,
498
- "fact-111": 104,
499
- "fact-112": 105,
500
- "fact-113": 106,
501
- "fact-114": 107,
502
- "fact-115": 108,
503
- "fact-116": 109,
504
- "fact-117": 110,
505
- "fact-118": 111,
506
- "fact-119": 112,
507
- "fact-12": 113,
508
- "fact-120": 114,
509
- "fact-121": 115,
510
- "fact-122": 116,
511
- "fact-123": 117,
512
- "fact-124": 118,
513
- "fact-125": 119,
514
- "fact-126": 120,
515
- "fact-127": 121,
516
- "fact-128": 122,
517
- "fact-129": 123,
518
- "fact-13": 124,
519
- "fact-130": 125,
520
- "fact-131": 126,
521
- "fact-132": 127,
522
- "fact-133": 128,
523
- "fact-134": 129,
524
- "fact-135": 130,
525
- "fact-136": 131,
526
- "fact-137": 132,
527
- "fact-138": 133,
528
- "fact-139": 134,
529
- "fact-14": 135,
530
- "fact-140": 136,
531
- "fact-141": 137,
532
- "fact-142": 138,
533
- "fact-143": 139,
534
- "fact-144": 140,
535
- "fact-145": 141,
536
- "fact-146": 142,
537
- "fact-15": 143,
538
- "fact-16": 144,
539
- "fact-17": 145,
540
- "fact-18": 146,
541
- "fact-19": 147,
542
- "fact-2": 148,
543
- "fact-20": 149,
544
- "fact-21": 150,
545
- "fact-22": 151,
546
- "fact-23": 152,
547
- "fact-24": 153,
548
- "fact-25": 154,
549
- "fact-26": 155,
550
- "fact-27": 156,
551
- "fact-28": 157,
552
- "fact-29": 158,
553
- "fact-3": 159,
554
- "fact-30": 160,
555
- "fact-31": 161,
556
- "fact-32": 162,
557
- "fact-33": 163,
558
- "fact-34": 164,
559
- "fact-35": 165,
560
- "fact-36": 166,
561
- "fact-37": 167,
562
- "fact-38": 168,
563
- "fact-39": 169,
564
- "fact-40": 170,
565
- "fact-41": 171,
566
- "fact-42": 172,
567
- "fact-43": 173,
568
- "fact-44": 174,
569
- "fact-45": 175,
570
- "fact-46": 176,
571
- "fact-47": 177,
572
- "fact-48": 178,
573
- "fact-49": 179,
574
- "fact-5": 180,
575
- "fact-50": 181,
576
- "fact-51": 182,
577
- "fact-52": 183,
578
- "fact-53": 184,
579
- "fact-54": 185,
580
- "fact-55": 186,
581
- "fact-56": 187,
582
- "fact-57": 188,
583
- "fact-58": 189,
584
- "fact-59": 190,
585
- "fact-6": 191,
586
- "fact-60": 192,
587
- "fact-61": 193,
588
- "fact-62": 194,
589
- "fact-63": 195,
590
- "fact-64": 196,
591
- "fact-65": 197,
592
- "fact-66": 198,
593
- "fact-67": 199,
594
- "fact-68": 200,
595
- "fact-69": 201,
596
- "fact-7": 202,
597
- "fact-70": 203,
598
- "fact-71": 204,
599
- "fact-72": 205,
600
- "fact-73": 206,
601
- "fact-74": 207,
602
- "fact-75": 208,
603
- "fact-76": 209,
604
- "fact-77": 210,
605
- "fact-78": 211,
606
- "fact-79": 212,
607
- "fact-8": 213,
608
- "fact-80": 214,
609
- "fact-81": 215,
610
- "fact-82": 216,
611
- "fact-83": 217,
612
- "fact-84": 218,
613
- "fact-85": 219,
614
- "fact-86": 220,
615
- "fact-87": 221,
616
- "fact-88": 222,
617
- "fact-89": 223,
618
- "fact-9": 224,
619
- "fact-90": 225,
620
- "fact-91": 226,
621
- "fact-92": 227,
622
- "fact-93": 228,
623
- "fact-94": 229,
624
- "fact-95": 230,
625
- "fact-96": 231,
626
- "fact-97": 232,
627
- "fact-98": 233,
628
- "fact-99": 234,
629
- "fear": 235,
630
- "feeling_better": 236,
631
- "feeling_burned_out": 237,
632
- "feeling_connected": 238,
633
- "feeling_exhausted": 239,
634
- "feeling_helpless": 240,
635
- "feeling_hopeless": 241,
636
- "feeling_rejected": 242,
637
- "feeling_strong": 243,
638
- "feeling_unworthy": 244,
639
- "feeling_weak": 245,
640
- "finding_inner_peace": 246,
641
- "finding_purpose": 247,
642
- "forgiveness": 248,
643
- "forgiving_oneself": 249,
644
- "friends": 250,
645
- "frustration": 251,
646
- "goal_setting": 252,
647
- "goodbye": 253,
648
- "gratitude": 254,
649
- "gratitude_practice": 255,
650
- "greeting": 256,
651
- "grief": 257,
652
- "guided_meditation": 258,
653
- "guilt": 259,
654
- "happy": 260,
655
- "hate-me": 261,
656
- "hate-you": 262,
657
- "healing": 263,
658
- "healing_wounds": 264,
659
- "help": 265,
660
- "help_seeking": 266,
661
- "hope": 267,
662
- "hope_for_the_future": 268,
663
- "hope_in_the_dark": 269,
664
- "hopelessness": 270,
665
- "improving_mental_health": 271,
666
- "inner_peace": 272,
667
- "inner_strength": 273,
668
- "insecurity": 274,
669
- "irritation": 275,
670
- "jokes": 276,
671
- "joy": 277,
672
- "learn-mental-health": 278,
673
- "learn-more": 279,
674
- "learning_from_mistakes": 280,
675
- "letting_go": 281,
676
- "letting_go_of_anger": 282,
677
- "letting_others_in": 283,
678
- "life_motivation": 284,
679
- "lifestyle_changes": 285,
680
- "listening": 286,
681
- "location": 287,
682
- "loneliness": 288,
683
- "loss": 289,
684
- "love": 290,
685
- "meditation": 291,
686
- "mental-health-fact": 292,
687
- "mental_clarity": 293,
688
- "mental_fatigue": 294,
689
- "mental_health_checkin": 295,
690
- "mental_health_day": 296,
691
- "mental_health_resources": 297,
692
- "mental_health_stigma": 298,
693
- "mind_over_matter": 299,
694
- "mindful_eating": 300,
695
- "mindfulness": 301,
696
- "morning": 302,
697
- "motivation": 303,
698
- "name": 304,
699
- "neutral-response": 305,
700
- "night": 306,
701
- "no-approach": 307,
702
- "no-response": 308,
703
- "nostalgia": 309,
704
- "not-talking": 310,
705
- "overcoming_fear": 311,
706
- "overcoming_obstacles": 312,
707
- "overwhelmed": 313,
708
- "pandora-useful": 314,
709
- "panic": 315,
710
- "personal_boundaries": 316,
711
- "personal_growth": 317,
712
- "positive_affirmation": 318,
713
- "pride": 319,
714
- "problem": 320,
715
- "procrastination": 321,
716
- "productivity": 322,
717
- "progress_not_perfection": 323,
718
- "reassurance": 324,
719
- "recovery_process": 325,
720
- "regret": 326,
721
- "relationship_advice": 327,
722
- "relaxation_techniques": 328,
723
- "relief": 329,
724
- "repeat": 330,
725
- "resentment": 331,
726
- "resilience_building": 332,
727
- "sad": 333,
728
- "satisfaction": 334,
729
- "scared": 335,
730
- "self-esteem": 336,
731
- "self_acceptance": 337,
732
- "self_awareness": 338,
733
- "self_care": 339,
734
- "self_compassion": 340,
735
- "self_doubt": 341,
736
- "self_esteem": 342,
737
- "self_improvement": 343,
738
- "self_love": 344,
739
- "self_reflection": 345,
740
- "self_trust": 346,
741
- "shame": 347,
742
- "skill": 348,
743
- "sleep": 349,
744
- "social_isolation": 350,
745
- "something-else": 351,
746
- "stress_management": 352,
747
- "stress_relief": 353,
748
- "stressed": 354,
749
- "struggling_with_life": 355,
750
- "stupid": 356,
751
- "suicide": 357,
752
- "surprise": 358,
753
- "talking_about_emotions": 359,
754
- "talking_about_feelings": 360,
755
- "talking_about_stress": 361,
756
- "talking_about_the_past": 362,
757
- "thanks": 363,
758
- "therapy_techniques": 364,
759
- "thought_reframing": 365,
760
- "time_management": 366,
761
- "trauma": 367,
762
- "trust": 368,
763
- "trust_issues": 369,
764
- "understand": 370,
765
- "user-advice": 371,
766
- "user-agree": 372,
767
- "user-meditation": 373,
768
- "who are you": 374,
769
- "worthless": 375,
770
- "wrong": 376
771
- },
772
- "layer_norm_eps": 1e-12,
773
- "max_position_embeddings": 512,
774
- "model_type": "bert",
775
- "num_attention_heads": 12,
776
- "num_hidden_layers": 12,
777
- "pad_token_id": 0,
778
- "position_embedding_type": "absolute",
779
- "problem_type": "single_label_classification",
780
- "torch_dtype": "float32",
781
- "transformers_version": "4.49.0",
782
- "type_vocab_size": 2,
783
- "use_cache": true,
784
- "vocab_size": 30522
785
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
intent_classifier/handler.py DELETED
@@ -1,98 +0,0 @@
1
- from typing import Dict, List, Any
2
- from transformers import pipeline, AutoConfig, AutoModelForCausalLM, AutoTokenizer, AutoModelForSequenceClassification
3
- from sentence_transformers import SentenceTransformer
4
- import torch
5
- import os
6
- import logging
7
-
8
- logging.basicConfig(level=logging.INFO)
9
- logger = logging.getLogger(__name__)
10
-
11
- class EndpointHandler:
12
- def __init__(self, path=""):
13
- self.path = path
14
- try:
15
- self.task = self._determine_task()
16
- except Exception as e:
17
- logger.error(f"Failed to determine task: {str(e)}")
18
- raise
19
-
20
- logger.info(f"Initializing model for task: {self.task} at path: {path}")
21
- if self.task == "text-generation":
22
- self.model = AutoModelForCausalLM.from_pretrained(
23
- path,
24
- torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32
25
- )
26
- self.tokenizer = AutoTokenizer.from_pretrained(path)
27
- self.pipeline = pipeline(
28
- "text-generation",
29
- model=self.model,
30
- tokenizer=self.tokenizer,
31
- device=0 if torch.cuda.is_available() else -1
32
- )
33
- elif self.task == "text-classification":
34
- self.model = AutoModelForSequenceClassification.from_pretrained(
35
- path,
36
- torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32
37
- )
38
- self.tokenizer = AutoTokenizer.from_pretrained(path)
39
- self.pipeline = pipeline(
40
- "text-classification",
41
- model=self.model,
42
- tokenizer=self.tokenizer,
43
- device=0 if torch.cuda.is_available() else -1
44
- )
45
- elif self.task == "sentence-embedding":
46
- self.model = SentenceTransformer(path)
47
- else:
48
- raise ValueError(f"Unsupported task: {self.task} for model at {path}")
49
-
50
- def _determine_task(self):
51
- config_path = os.path.join(self.path, "config.json")
52
- if not os.path.exists(config_path):
53
- logger.error(f"config.json not found in {self.path}")
54
- raise ValueError(f"config.json not found in {self.path}")
55
-
56
- try:
57
- config = AutoConfig.from_pretrained(self.path)
58
- model_type = config.model_type if hasattr(config, "model_type") else None
59
- except Exception as e:
60
- logger.error(f"Failed to load config: {str(e)}")
61
- raise ValueError(f"Invalid config.json in {self.path}: {str(e)}")
62
-
63
- text_generation_types = ["gpt2"]
64
- text_classification_types = ["bert", "distilbert", "roberta"]
65
- embedding_types = ["bert"]
66
-
67
- model_name = self.path.split("/")[-1].lower()
68
- logger.info(f"Model name: {model_name}, Model type: {model_type}")
69
- if model_type in text_generation_types or model_name in ["fine_tuned_gpt2", "merged_distilgpt2"]:
70
- return "text-generation"
71
- elif model_type in text_classification_types or model_name in ["emotion_classifier", "emotion_model", "intent_classifier", "intent_fallback"]:
72
- return "text-classification"
73
- elif model_name in ["intent_encoder", "sentence_transformer"] or "sentence_bert_config.json" in os.listdir(self.path):
74
- return "sentence-embedding"
75
- raise ValueError(f"Could not determine task for model_type: {model_type}, model_name: {model_name}")
76
-
77
- def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
78
- inputs = data.get("inputs", "")
79
- parameters = data.get("parameters", None)
80
- if not inputs:
81
- logger.warning("No inputs provided")
82
- return [{"error": "No inputs provided"}]
83
-
84
- try:
85
- logger.info(f"Processing inputs for task: {self.task}")
86
- if self.task == "text-generation":
87
- result = self.pipeline(inputs, max_length=50, num_return_sequences=1, **(parameters or {}))
88
- return [{"generated_text": item["generated_text"]} for item in result]
89
- elif self.task == "text-classification":
90
- result = self.pipeline(inputs, return_all_scores=True, **(parameters or {}))
91
- return [{"label": item["label"], "score": item["score"]} for sublist in result for item in sublist]
92
- elif self.task == "sentence-embedding":
93
- embeddings = self.model.encode(inputs)
94
- return [{"embeddings": embeddings.tolist()}]
95
- return [{"error": f"Unsupported task: {self.task}"}]
96
- except Exception as e:
97
- logger.error(f"Inference failed: {str(e)}")
98
- return [{"error": f"Inference failed: {str(e)}"}]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
intent_classifier/model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9554b275444fb486e69844bba243e1fd114071c724426213ee12a82831f3ba7c
3
- size 439112148
 
 
 
 
intent_classifier/requirements.txt DELETED
@@ -1,3 +0,0 @@
1
- transformers>=4.38.2
2
- sentence-transformers>=2.2.2
3
- torch>=2.0.0
 
 
 
 
intent_classifier/special_tokens_map.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "cls_token": "[CLS]",
3
- "mask_token": "[MASK]",
4
- "pad_token": "[PAD]",
5
- "sep_token": "[SEP]",
6
- "unk_token": "[UNK]"
7
- }
 
 
 
 
 
 
 
 
intent_classifier/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
intent_classifier/tokenizer_config.json DELETED
@@ -1,56 +0,0 @@
1
- {
2
- "added_tokens_decoder": {
3
- "0": {
4
- "content": "[PAD]",
5
- "lstrip": false,
6
- "normalized": false,
7
- "rstrip": false,
8
- "single_word": false,
9
- "special": true
10
- },
11
- "100": {
12
- "content": "[UNK]",
13
- "lstrip": false,
14
- "normalized": false,
15
- "rstrip": false,
16
- "single_word": false,
17
- "special": true
18
- },
19
- "101": {
20
- "content": "[CLS]",
21
- "lstrip": false,
22
- "normalized": false,
23
- "rstrip": false,
24
- "single_word": false,
25
- "special": true
26
- },
27
- "102": {
28
- "content": "[SEP]",
29
- "lstrip": false,
30
- "normalized": false,
31
- "rstrip": false,
32
- "single_word": false,
33
- "special": true
34
- },
35
- "103": {
36
- "content": "[MASK]",
37
- "lstrip": false,
38
- "normalized": false,
39
- "rstrip": false,
40
- "single_word": false,
41
- "special": true
42
- }
43
- },
44
- "clean_up_tokenization_spaces": false,
45
- "cls_token": "[CLS]",
46
- "do_lower_case": true,
47
- "extra_special_tokens": {},
48
- "mask_token": "[MASK]",
49
- "model_max_length": 512,
50
- "pad_token": "[PAD]",
51
- "sep_token": "[SEP]",
52
- "strip_accents": null,
53
- "tokenize_chinese_chars": true,
54
- "tokenizer_class": "BertTokenizer",
55
- "unk_token": "[UNK]"
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
intent_classifier/vocab.txt DELETED
The diff for this file is too large to render. See raw diff