Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
·
aa28f07
1
Parent(s):
fb772e1
防止产生过多的打印消息
Browse files
utils.py
CHANGED
@@ -49,10 +49,8 @@ def postprocess(
|
|
49 |
return y
|
50 |
|
51 |
def count_token(input_str):
|
52 |
-
print("计算输入Token计数中……")
|
53 |
encoding = tiktoken.encoding_for_model("gpt-3.5-turbo")
|
54 |
length = len(encoding.encode(input_str))
|
55 |
-
print("计算完成!")
|
56 |
return length
|
57 |
|
58 |
def parse_text(text):
|
|
|
49 |
return y
|
50 |
|
51 |
def count_token(input_str):
|
|
|
52 |
encoding = tiktoken.encoding_for_model("gpt-3.5-turbo")
|
53 |
length = len(encoding.encode(input_str))
|
|
|
54 |
return length
|
55 |
|
56 |
def parse_text(text):
|