Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -2,7 +2,9 @@ import gradio as gr
|
|
2 |
from xsbpe.basic import BasicTokenizer
|
3 |
|
4 |
tk = BasicTokenizer()
|
5 |
-
|
|
|
|
|
6 |
|
7 |
def tokenize(text):
|
8 |
tokens = tk.encode(text)
|
|
|
2 |
from xsbpe.basic import BasicTokenizer
|
3 |
|
4 |
tk = BasicTokenizer()
|
5 |
+
print('Tokenizer initialized.')
|
6 |
+
tk.train(open('dune.txt').read(), 256 + 10, verbose=False)
|
7 |
+
print('Training complete.')
|
8 |
|
9 |
def tokenize(text):
|
10 |
tokens = tk.encode(text)
|