chethan999 commited on
Commit
a357543
·
verified ·
1 Parent(s): e8b2463

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +65 -5
README.md CHANGED
@@ -1,12 +1,72 @@
1
  ---
2
- title: Household Power Bpe Tokenizer
3
- emoji: 📚
4
- colorFrom: green
5
- colorTo: blue
6
  sdk: gradio
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Household Power BPE Tokenizer
3
+ emoji:
4
+ colorFrom: blue
5
+ colorTo: purple
6
  sdk: gradio
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
11
  ---
12
 
13
+ # Household Power BPE Tokenizer
14
+
15
+ A BPE (Byte-Pair Encoding) tokenizer trained on household power consumption data. This tokenizer is specifically designed to efficiently encode time-series power consumption data with structured format.
16
+
17
+ ## Model Details
18
+
19
+ - **Vocabulary Size:** 8,000 tokens
20
+ - **Model Type:** BPE (Byte-Pair Encoding)
21
+ - **Character Coverage:** 100%
22
+ - **Training Data:** Household power consumption dataset
23
+
24
+ ## Features
25
+
26
+ - Efficient tokenization of structured power consumption data
27
+ - Handles date, time, and numerical values
28
+ - Supports pipe-separated format (e.g., `DATE=16/12/2006|TIME=17:24:00|GAP=4.216`)
29
+ - Real-time encoding and decoding through web interface
30
+
31
+ ## Usage
32
+
33
+ ### Using the Web Interface
34
+
35
+ Simply enter your power consumption data in the input box and click "Tokenize" to see:
36
+ - Token IDs
37
+ - Token strings
38
+ - Decoded output
39
+
40
+ ### Example Input
41
+
42
+ ```
43
+ DATE=16/12/2006|TIME=17:24:00|GAP=4.216|GRP=0.418|V=234.840|GI=18.400|SM1=0.000|SM2=1.000|SM3=17.000
44
+ ```
45
+
46
+ ### Using the Tokenizer in Python
47
+
48
+ ```python
49
+ import sentencepiece as spm
50
+
51
+ # Load the model
52
+ sp = spm.SentencePieceProcessor(model_file="household_power_bpe.model")
53
+
54
+ # Encode
55
+ text = "DATE=16/12/2006|TIME=17:24:00|GAP=4.216"
56
+ token_ids = sp.encode(text, out_type=int)
57
+ token_strings = sp.encode(text, out_type=str)
58
+
59
+ # Decode
60
+ decoded = sp.decode(token_ids)
61
+ ```
62
+
63
+ ## Files
64
+
65
+ - `app.py` - Gradio web interface
66
+ - `household_power_bpe.model` - Trained SentencePiece model
67
+ - `household_power_bpe.vocab` - Vocabulary file
68
+ - `requirements.txt` - Python dependencies
69
+
70
+ ## License
71
+
72
+ MIT