mirror of https://github.com/arc53/DocsGPT
chore: Update Docker build platforms for application and frontend and optimised embedding import
parent
4534cafd3f
commit
5c8133a810
@ -1,6 +1,6 @@
|
||||
from transformers import GPT2TokenizerFast
|
||||
|
||||
tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')
|
||||
tokenizer.model_max_length = 100000
|
||||
def count_tokens(string):
|
||||
|
||||
return len(tokenizer(string)['input_ids'])
|
Loading…
Reference in New Issue