Upload config
Browse files- config.json +2 -18
- config.py +1 -1
config.json
CHANGED
@@ -1,11 +1,6 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "shhossain/all-MiniLM-L6-v2-sentiment-classifier",
|
3 |
-
"architectures": [
|
4 |
-
"SententenceTransformerSentimentModel"
|
5 |
-
],
|
6 |
"auto_map": {
|
7 |
-
"AutoConfig": "
|
8 |
-
"AutoModelForSequenceClassification": "shhossain/all-MiniLM-L6-v2-sentiment-classifier--model.SententenceTransformerSentimentModel"
|
9 |
},
|
10 |
"class_map": {
|
11 |
"0": "sad",
|
@@ -15,20 +10,9 @@
|
|
15 |
"4": "fear",
|
16 |
"5": "surprise"
|
17 |
},
|
18 |
-
"
|
19 |
-
"text-classification": {
|
20 |
-
"impl": "smodelpipeline.SentimentModelPipe",
|
21 |
-
"pt": [
|
22 |
-
"AutoModelForSequenceClassification"
|
23 |
-
],
|
24 |
-
"tf": [],
|
25 |
-
"type": "text"
|
26 |
-
}
|
27 |
-
},
|
28 |
-
"embedding_model": "all-MiniLM-L6-v2",
|
29 |
"h1": 44,
|
30 |
"h2": 46,
|
31 |
"model_type": "SententenceTransformerSentimentClassifier",
|
32 |
-
"torch_dtype": "float32",
|
33 |
"transformers_version": "4.29.0"
|
34 |
}
|
|
|
1 |
{
|
|
|
|
|
|
|
|
|
2 |
"auto_map": {
|
3 |
+
"AutoConfig": "config.SentimentConfig"
|
|
|
4 |
},
|
5 |
"class_map": {
|
6 |
"0": "sad",
|
|
|
10 |
"4": "fear",
|
11 |
"5": "surprise"
|
12 |
},
|
13 |
+
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
"h1": 44,
|
15 |
"h2": 46,
|
16 |
"model_type": "SententenceTransformerSentimentClassifier",
|
|
|
17 |
"transformers_version": "4.29.0"
|
18 |
}
|
config.py
CHANGED
@@ -6,7 +6,7 @@ mp = {0:'sad',1:'joy',2:'love',3:'anger',4:'fear',5:'surprise'}
|
|
6 |
class SentimentConfig(PretrainedConfig):
|
7 |
model_type = "SententenceTransformerSentimentClassifier"
|
8 |
|
9 |
-
def __init__(self, embedding_model: str="all-MiniLM-L6-v2", class_map: dict=mp, h1: int=44, h2: int=46, **kwargs):
|
10 |
self.embedding_model = embedding_model
|
11 |
self.class_map = class_map
|
12 |
self.h1 = h1
|
|
|
6 |
class SentimentConfig(PretrainedConfig):
|
7 |
model_type = "SententenceTransformerSentimentClassifier"
|
8 |
|
9 |
+
def __init__(self, embedding_model: str="sentence-transformers/all-MiniLM-L6-v2", class_map: dict=mp, h1: int=44, h2: int=46, **kwargs):
|
10 |
self.embedding_model = embedding_model
|
11 |
self.class_map = class_map
|
12 |
self.h1 = h1
|