remove redundant list comprehension from inside all. (#397)

remove explicit inherit from object.
This commit is contained in:
Drew Hintz
2022-10-13 11:58:35 -05:00
committed by GitHub
parent 793edf8900
commit 165fb4d631
3 changed files with 9 additions and 9 deletions

View File

@@ -529,7 +529,7 @@ def bytes_to_unicode():
cs = [chr(n) for n in cs]
return dict(zip(bs, cs))
class ClipTokenizer(object):
class ClipTokenizer:
def __init__(self, bpe_path: str = default_bpe()):
self.byte_encoder = bytes_to_unicode()
merges = gzip.open(bpe_path).read().decode("utf-8").split('\n')