Joshua Lochner commited on
Commit
17feb06
β€’
1 Parent(s): 7edb1ea

Move model folder contents to root folder

Browse files
model/added_tokens.json β†’ added_tokens.json RENAMED
File without changes
config.json CHANGED
@@ -1,8 +1,39 @@
1
  {
 
 
 
 
 
 
 
 
 
 
2
  "id2label": {
3
- "0": 0,
4
- "1": 1,
5
- "2": 2,
6
- "3": 3
7
- }
8
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  {
2
+ "_name_or_path": "bert-based-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": "NONE",
14
+ "1": "SPONSOR",
15
+ "2": "SELFPROMO",
16
+ "3": "INTERACTION"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": {
21
+ "INTERACTION": 3,
22
+ "NONE": 0,
23
+ "SELFPROMO": 2,
24
+ "SPONSOR": 1
25
+ },
26
+ "layer_norm_eps": 1e-12,
27
+ "max_position_embeddings": 512,
28
+ "model_type": "bert",
29
+ "num_attention_heads": 12,
30
+ "num_hidden_layers": 12,
31
+ "pad_token_id": 0,
32
+ "position_embedding_type": "absolute",
33
+ "problem_type": "single_label_classification",
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.17.0",
36
+ "type_vocab_size": 2,
37
+ "use_cache": true,
38
+ "vocab_size": 30541
39
+ }
model/config.json DELETED
@@ -1,39 +0,0 @@
1
- {
2
- "_name_or_path": "bert-based-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": "NONE",
14
- "1": "SPONSOR",
15
- "2": "SELFPROMO",
16
- "3": "INTERACTION"
17
- },
18
- "initializer_range": 0.02,
19
- "intermediate_size": 3072,
20
- "label2id": {
21
- "INTERACTION": 3,
22
- "NONE": 0,
23
- "SELFPROMO": 2,
24
- "SPONSOR": 1
25
- },
26
- "layer_norm_eps": 1e-12,
27
- "max_position_embeddings": 512,
28
- "model_type": "bert",
29
- "num_attention_heads": 12,
30
- "num_hidden_layers": 12,
31
- "pad_token_id": 0,
32
- "position_embedding_type": "absolute",
33
- "problem_type": "single_label_classification",
34
- "torch_dtype": "float32",
35
- "transformers_version": "4.17.0",
36
- "type_vocab_size": 2,
37
- "use_cache": true,
38
- "vocab_size": 30541
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pipeline.py CHANGED
@@ -281,9 +281,8 @@ def binary_search_above(transcript, start_index, end_index, time):
281
 
282
  class PreTrainedPipeline():
283
  def __init__(self, path: str):
284
- path2 = os.path.join(path, 'model')
285
- self.model2 = AutoModelForSequenceClassification.from_pretrained(path2)
286
- self.tokenizer2 = AutoTokenizer.from_pretrained(path2)
287
  self.pipeline2 = SponsorBlockClassificationPipeline(
288
  model=self.model2, tokenizer=self.tokenizer2)
289
 
@@ -320,4 +319,3 @@ class SponsorBlockClassificationPipeline(TextClassificationPipeline):
320
 
321
  return self.tokenizer(
322
  text, return_tensors=self.framework, **tokenizer_kwargs)
323
-
281
 
282
  class PreTrainedPipeline():
283
  def __init__(self, path: str):
284
+ self.model2 = AutoModelForSequenceClassification.from_pretrained(path)
285
+ self.tokenizer2 = AutoTokenizer.from_pretrained(path)
 
286
  self.pipeline2 = SponsorBlockClassificationPipeline(
287
  model=self.model2, tokenizer=self.tokenizer2)
288
 
319
 
320
  return self.tokenizer(
321
  text, return_tensors=self.framework, **tokenizer_kwargs)
 
model/pytorch_model.bin β†’ pytorch_model.bin RENAMED
File without changes
model/rng_state.pth β†’ rng_state.pth RENAMED
File without changes
model/scheduler.pt β†’ scheduler.pt RENAMED
File without changes
model/special_tokens_map.json β†’ special_tokens_map.json RENAMED
File without changes
model/tokenizer.json β†’ tokenizer.json RENAMED
File without changes
model/tokenizer_config.json β†’ tokenizer_config.json RENAMED
File without changes
model/trainer_state.json β†’ trainer_state.json RENAMED
File without changes
model/training_args.bin β†’ training_args.bin RENAMED
File without changes
model/vocab.txt β†’ vocab.txt RENAMED
File without changes