Skip to content

Commit 5e8723d

Browse files
committed
fix save
1 parent dd80464 commit 5e8723d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

keras_hub/src/models/rwkv7/rwkv7_tokenizer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import os
22

33
import keras
4-
from keras_hub.src.models.rwkv7.rwkv7_backbone import RWKV7Backbone
4+
55
from keras_hub.src.api_export import keras_hub_export
6+
from keras_hub.src.models.rwkv7.rwkv7_backbone import RWKV7Backbone
67
from keras_hub.src.tokenizers import tokenizer
78
from keras_hub.src.utils.tensor_utils import is_int_dtype
89
from keras_hub.src.utils.tensor_utils import is_string_dtype
@@ -221,6 +222,7 @@ class RWKVTokenizer(tokenizer.Tokenizer):
221222
Output:
222223
[3, 0, 2]
223224
"""
225+
224226
backbone_cls = RWKV7Backbone
225227

226228
def __init__(
@@ -269,7 +271,7 @@ def save_assets(self, dir_path):
269271
"""
270272
path = os.path.join(dir_path, VOCAB_FILENAME)
271273
with open(path, "w", encoding="utf-8") as file:
272-
file.write("\n".join(self.vocabulary))
274+
file.write("".join(self.vocabulary))
273275

274276
def load_assets(self, dir_path=""):
275277
"""Load vocabulary from directory.

0 commit comments

Comments
 (0)