EmeraldMP commited on
Commit
a18acfc
1 Parent(s): 1d0fef3

Add SetFit model

Browse files
Files changed (4) hide show
  1. README.md +36 -21
  2. config_setfit.json +2 -2
  3. model.safetensors +1 -1
  4. model_head.pkl +1 -1
README.md CHANGED
@@ -8,11 +8,14 @@ tags:
8
  metrics:
9
  - accuracy
10
  widget:
11
- - text: Artificial intelligence is changing the way we live and work.
12
- - text: The university is offering scholarships for students in financial need.
13
- - text: The new Marvel movie is breaking box office records.
14
- - text: The annual Met Gala is a major event in the fashion world.
15
- - text: Visiting the Grand Canyon is a breathtaking experience.
 
 
 
16
  pipeline_tag: text-classification
17
  inference: true
18
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
@@ -79,7 +82,7 @@ from setfit import SetFitModel
79
  # Download from the 🤗 Hub
80
  model = SetFitModel.from_pretrained("EmeraldMP/ANLP_kaggle")
81
  # Run inference
82
- preds = model("The new Marvel movie is breaking box office records.")
83
  ```
84
 
85
  <!--
@@ -111,22 +114,22 @@ preds = model("The new Marvel movie is breaking box office records.")
111
  ### Training Set Metrics
112
  | Training set | Min | Median | Max |
113
  |:-------------|:----|:--------|:----|
114
- | Word count | 8 | 11.0833 | 17 |
115
 
116
  | Label | Training Sample Count |
117
  |:--------------|:----------------------|
118
- | Education | 3 |
119
- | Entertainment | 3 |
120
- | Environment | 3 |
121
- | Fashion | 3 |
122
- | Finance | 3 |
123
- | Food | 3 |
124
- | Health | 3 |
125
- | Politics | 3 |
126
- | Science | 3 |
127
- | Sports | 3 |
128
- | Technology | 3 |
129
- | Travel | 3 |
130
 
131
  ### Training Hyperparameters
132
  - batch_size: (16, 16)
@@ -149,8 +152,20 @@ preds = model("The new Marvel movie is breaking box office records.")
149
  ### Training Results
150
  | Epoch | Step | Training Loss | Validation Loss |
151
  |:------:|:----:|:-------------:|:---------------:|
152
- | 0.0111 | 1 | 0.1765 | - |
153
- | 0.5556 | 50 | 0.0137 | - |
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
  ### Framework Versions
156
  - Python: 3.10.12
 
8
  metrics:
9
  - accuracy
10
  widget:
11
+ - text: The development of smart cities is leveraging technology to improve urban
12
+ living conditions.
13
+ - text: Climate change is causing a significant rise in sea levels.
14
+ - text: Fans are speculating about the plot of the upcoming season of Stranger Things.
15
+ - text: Fashion branding and marketing campaigns shape consumer perceptions and influence
16
+ purchasing decisions.
17
+ - text: Volunteering abroad provides a unique opportunity to experience different
18
+ cultures while giving back to society.
19
  pipeline_tag: text-classification
20
  inference: true
21
  base_model: sentence-transformers/paraphrase-mpnet-base-v2
 
82
  # Download from the 🤗 Hub
83
  model = SetFitModel.from_pretrained("EmeraldMP/ANLP_kaggle")
84
  # Run inference
85
+ preds = model("Climate change is causing a significant rise in sea levels.")
86
  ```
87
 
88
  <!--
 
114
  ### Training Set Metrics
115
  | Training set | Min | Median | Max |
116
  |:-------------|:----|:--------|:----|
117
+ | Word count | 7 | 12.8073 | 24 |
118
 
119
  | Label | Training Sample Count |
120
  |:--------------|:----------------------|
121
+ | Education | 23 |
122
+ | Entertainment | 23 |
123
+ | Environment | 23 |
124
+ | Fashion | 23 |
125
+ | Finance | 23 |
126
+ | Food | 23 |
127
+ | Health | 23 |
128
+ | Politics | 22 |
129
+ | Science | 23 |
130
+ | Sports | 23 |
131
+ | Technology | 23 |
132
+ | Travel | 23 |
133
 
134
  ### Training Hyperparameters
135
  - batch_size: (16, 16)
 
152
  ### Training Results
153
  | Epoch | Step | Training Loss | Validation Loss |
154
  |:------:|:----:|:-------------:|:---------------:|
155
+ | 0.0015 | 1 | 0.2839 | - |
156
+ | 0.0727 | 50 | 0.1245 | - |
157
+ | 0.1453 | 100 | 0.1334 | - |
158
+ | 0.2180 | 150 | 0.0142 | - |
159
+ | 0.2907 | 200 | 0.0046 | - |
160
+ | 0.3634 | 250 | 0.0024 | - |
161
+ | 0.4360 | 300 | 0.0019 | - |
162
+ | 0.5087 | 350 | 0.0011 | - |
163
+ | 0.5814 | 400 | 0.0013 | - |
164
+ | 0.6541 | 450 | 0.0007 | - |
165
+ | 0.7267 | 500 | 0.0011 | - |
166
+ | 0.7994 | 550 | 0.001 | - |
167
+ | 0.8721 | 600 | 0.001 | - |
168
+ | 0.9448 | 650 | 0.0004 | - |
169
 
170
  ### Framework Versions
171
  - Python: 3.10.12
config_setfit.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "labels": [
3
  "Education",
4
  "Entertainment",
@@ -12,6 +13,5 @@
12
  "Sports",
13
  "Technology",
14
  "Travel"
15
- ],
16
- "normalize_embeddings": false
17
  }
 
1
  {
2
+ "normalize_embeddings": false,
3
  "labels": [
4
  "Education",
5
  "Entertainment",
 
13
  "Sports",
14
  "Technology",
15
  "Travel"
16
+ ]
 
17
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9ead0296fbdd6209f7b8b0298059ca8311d854fab898a50c077becf041ad68f8
3
  size 437967672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5562ac9f8560da754bdeb3dfb4b75b559482755a128183e84a01e27901ca23c5
3
  size 437967672
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6ae16cf8f25bb088110133fcf0b0b18b7c0e42a670b9046ba90cc5d642b4bba5
3
  size 75287
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1e6987a92cd9d6f2c7696ed3da31b347bdab0c54b8c7205ab12eaf91a3cc938
3
  size 75287