mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 12:13:38 +00:00
chore: Update Docker build platforms for application and frontend and optimised embedding import
This commit is contained in:
1 parent
4534cafd3f
commit
5c8133a810
6 files changed
+14
-20
No files matched your search
@@ -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'])
|
||||
Reference in new issue
Block a user