albertosei commited on
Commit
f79e8d6
·
verified ·
1 Parent(s): 675cac6

Upload folder using huggingface_hub

Browse files
config.json ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/layoutlmv3-base",
3
+ "architectures": [
4
+ "LayoutLMv3ForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "coordinate_size": 128,
10
+ "eos_token_id": 2,
11
+ "has_relative_attention_bias": true,
12
+ "has_spatial_attention_bias": true,
13
+ "hidden_act": "gelu",
14
+ "hidden_dropout_prob": 0.1,
15
+ "hidden_size": 768,
16
+ "id2label": {
17
+ "0": "B-ITEM_DESC",
18
+ "1": "E-ITEM_DESC",
19
+ "2": "S-ITEM_DESC",
20
+ "3": "S-CLIENT_ADDRESS",
21
+ "4": "E-VAT (PER ITEM OR PERCENTAGE)",
22
+ "5": "B-SELLER_ADDRESS",
23
+ "6": "S-INVOICE_NUMBER",
24
+ "7": "S-TOTAL_NET_WORTH",
25
+ "8": "I-CLIENT_ADDRESS",
26
+ "9": "E-TOTAL_NET_WORTH",
27
+ "10": "B-NET_WORTH",
28
+ "11": "E-TOTAL_GROSS_WORTH",
29
+ "12": "E-CLIENT",
30
+ "13": "I-SELLER",
31
+ "14": "S-CLIENT",
32
+ "15": "S-GROSS_WORTH",
33
+ "16": "S-SELLER",
34
+ "17": "I-NET_PRICE",
35
+ "18": "B-CLIENT",
36
+ "19": "E-IBAN",
37
+ "20": "S-INVOICE_DATE",
38
+ "21": "B-TOTAL_NET_WORTH",
39
+ "22": "S-IBAN",
40
+ "23": "I-IBAN",
41
+ "24": "E-CLIENT_ADDRESS",
42
+ "25": "S-NET_PRICE",
43
+ "26": "S-NET_WORTH",
44
+ "27": "O",
45
+ "28": "E-QTY",
46
+ "29": "B-SELLER",
47
+ "30": "B-CLIENT_ADDRESS",
48
+ "31": "I-CLIENT",
49
+ "32": "B-ITEM_NO",
50
+ "33": "B-TOTAL_VAT",
51
+ "34": "I-TOTAL_VAT",
52
+ "35": "I-NET_WORTH",
53
+ "36": "S-CURRENCY",
54
+ "37": "B-GROSS_WORTH",
55
+ "38": "E-ITEM_NO",
56
+ "39": "B-TOTAL_GROSS_WORTH",
57
+ "40": "E-GROSS_WORTH",
58
+ "41": "S-TOTAL_VAT",
59
+ "42": "S-VAT (PER ITEM OR PERCENTAGE)",
60
+ "43": "E-NET_WORTH",
61
+ "44": "S-TOTAL_GROSS_WORTH",
62
+ "45": "E-SELLER_ADDRESS",
63
+ "46": "S-SELLER_ADDRESS",
64
+ "47": "S-ITEM_NO",
65
+ "48": "I-SELLER_ADDRESS",
66
+ "49": "B-VAT (PER ITEM OR PERCENTAGE)",
67
+ "50": "E-SELLER",
68
+ "51": "I-ITEM_DESC",
69
+ "52": "S-QTY",
70
+ "53": "E-NET_PRICE",
71
+ "54": "S-SELLER_TAX_ID",
72
+ "55": "S-CLIENT_TAX_ID",
73
+ "56": "E-TOTAL_VAT",
74
+ "57": "B-NET_PRICE",
75
+ "58": "B-IBAN",
76
+ "59": "B-QTY"
77
+ },
78
+ "initializer_range": 0.02,
79
+ "input_size": 224,
80
+ "intermediate_size": 3072,
81
+ "label2id": {
82
+ "B-CLIENT": 18,
83
+ "B-CLIENT_ADDRESS": 30,
84
+ "B-GROSS_WORTH": 37,
85
+ "B-IBAN": 58,
86
+ "B-ITEM_DESC": 0,
87
+ "B-ITEM_NO": 32,
88
+ "B-NET_PRICE": 57,
89
+ "B-NET_WORTH": 10,
90
+ "B-QTY": 59,
91
+ "B-SELLER": 29,
92
+ "B-SELLER_ADDRESS": 5,
93
+ "B-TOTAL_GROSS_WORTH": 39,
94
+ "B-TOTAL_NET_WORTH": 21,
95
+ "B-TOTAL_VAT": 33,
96
+ "B-VAT (PER ITEM OR PERCENTAGE)": 49,
97
+ "E-CLIENT": 12,
98
+ "E-CLIENT_ADDRESS": 24,
99
+ "E-GROSS_WORTH": 40,
100
+ "E-IBAN": 19,
101
+ "E-ITEM_DESC": 1,
102
+ "E-ITEM_NO": 38,
103
+ "E-NET_PRICE": 53,
104
+ "E-NET_WORTH": 43,
105
+ "E-QTY": 28,
106
+ "E-SELLER": 50,
107
+ "E-SELLER_ADDRESS": 45,
108
+ "E-TOTAL_GROSS_WORTH": 11,
109
+ "E-TOTAL_NET_WORTH": 9,
110
+ "E-TOTAL_VAT": 56,
111
+ "E-VAT (PER ITEM OR PERCENTAGE)": 4,
112
+ "I-CLIENT": 31,
113
+ "I-CLIENT_ADDRESS": 8,
114
+ "I-IBAN": 23,
115
+ "I-ITEM_DESC": 51,
116
+ "I-NET_PRICE": 17,
117
+ "I-NET_WORTH": 35,
118
+ "I-SELLER": 13,
119
+ "I-SELLER_ADDRESS": 48,
120
+ "I-TOTAL_VAT": 34,
121
+ "O": 27,
122
+ "S-CLIENT": 14,
123
+ "S-CLIENT_ADDRESS": 3,
124
+ "S-CLIENT_TAX_ID": 55,
125
+ "S-CURRENCY": 36,
126
+ "S-GROSS_WORTH": 15,
127
+ "S-IBAN": 22,
128
+ "S-INVOICE_DATE": 20,
129
+ "S-INVOICE_NUMBER": 6,
130
+ "S-ITEM_DESC": 2,
131
+ "S-ITEM_NO": 47,
132
+ "S-NET_PRICE": 25,
133
+ "S-NET_WORTH": 26,
134
+ "S-QTY": 52,
135
+ "S-SELLER": 16,
136
+ "S-SELLER_ADDRESS": 46,
137
+ "S-SELLER_TAX_ID": 54,
138
+ "S-TOTAL_GROSS_WORTH": 44,
139
+ "S-TOTAL_NET_WORTH": 7,
140
+ "S-TOTAL_VAT": 41,
141
+ "S-VAT (PER ITEM OR PERCENTAGE)": 42
142
+ },
143
+ "layer_norm_eps": 1e-05,
144
+ "max_2d_position_embeddings": 1024,
145
+ "max_position_embeddings": 514,
146
+ "max_rel_2d_pos": 256,
147
+ "max_rel_pos": 128,
148
+ "model_type": "layoutlmv3",
149
+ "num_attention_heads": 12,
150
+ "num_channels": 3,
151
+ "num_hidden_layers": 12,
152
+ "pad_token_id": 1,
153
+ "patch_size": 16,
154
+ "rel_2d_pos_bins": 64,
155
+ "rel_pos_bins": 32,
156
+ "second_input_size": 112,
157
+ "shape_size": 128,
158
+ "text_embed": true,
159
+ "torch_dtype": "float32",
160
+ "transformers_version": "4.37.2",
161
+ "type_vocab_size": 1,
162
+ "visual_embed": true,
163
+ "vocab_size": 50265
164
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e3b311cfcef489607be9187744a957673267082999704acc53cd25b9d74f682
3
+ size 503881160
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": false,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "LayoutLMv3ImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "ocr_lang": null,
18
+ "processor_class": "LayoutLMv3Processor",
19
+ "resample": 2,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "height": 224,
23
+ "width": 224
24
+ },
25
+ "tesseract_config": ""
26
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "apply_ocr": false,
46
+ "bos_token": "<s>",
47
+ "clean_up_tokenization_spaces": true,
48
+ "cls_token": "<s>",
49
+ "cls_token_box": [
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0
54
+ ],
55
+ "eos_token": "</s>",
56
+ "errors": "replace",
57
+ "mask_token": "<mask>",
58
+ "model_max_length": 512,
59
+ "only_label_first_subword": true,
60
+ "pad_token": "<pad>",
61
+ "pad_token_box": [
62
+ 0,
63
+ 0,
64
+ 0,
65
+ 0
66
+ ],
67
+ "pad_token_label": -100,
68
+ "processor_class": "LayoutLMv3Processor",
69
+ "sep_token": "</s>",
70
+ "sep_token_box": [
71
+ 0,
72
+ 0,
73
+ 0,
74
+ 0
75
+ ],
76
+ "tokenizer_class": "LayoutLMv3Tokenizer",
77
+ "trim_offsets": true,
78
+ "unk_token": "<unk>"
79
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3366a47b4b48a48a2133f907c48438e55cffcfa3c653aa446fac79ca5476a9be
3
+ size 4600
upload_model2.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # upload_model.py
2
+ from huggingface_hub import HfApi, HfFolder
3
+
4
+ # Define your model path and the desired repository ID on the Hub
5
+ MODEL_PATH = r"C:\Users\alber\OneDrive\Desktop\PROJECTS\TYNCAD\UBIAI\Layoutmv" # Path to your local model folder
6
+ REPO_ID = "albertosei/layout_ubiai" #
7
+
8
+ print(f"Uploading model from '{MODEL_PATH}' to '{REPO_ID}'...")
9
+
10
+ # The library will automatically find and use the token you just saved.
11
+ api = HfApi()
12
+
13
+ # Create the repository on the Hub if it doesn't exist
14
+ api.create_repo(repo_id=REPO_ID, repo_type="model", exist_ok=True)
15
+
16
+ # Upload the entire folder
17
+ api.upload_folder(
18
+ folder_path=MODEL_PATH,
19
+ repo_id=REPO_ID,
20
+ repo_type="model",
21
+ )
22
+
23
+ print("✅ Upload complete! Check your model on the Hugging Face Hub.")
vocab.json ADDED
The diff for this file is too large to render. See raw diff