MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / decode

Method decode

extract_clip/simple_tokenizer.py:129–132  ·  view source on GitHub ↗
(self, tokens)

Source from the content-addressed store, hash-verified

127 return bpe_tokens
128
129 def decode(self, tokens):
130 text = ''.join([self.decoder[token] for token in tokens])
131 text = bytearray([self.byte_decoder[c] for c in text]).decode('utf-8', errors="replace").replace('</w>', ' ')
132 return text

Callers 6

__init__Method · 0.80
__getitem__Method · 0.80
pyav_decode_streamFunction · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected