Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def bot(history, api_kind):
|
|
102 |
raise ValueError(f"API {api_kind} is not supported")
|
103 |
try:
|
104 |
count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
|
105 |
-
print(prompt_html,'token count is',count_tokens)
|
106 |
history[-1][1] = ""
|
107 |
for character in generate_fn(prompt, history[:-1]):
|
108 |
history[-1][1] = character
|
|
|
102 |
raise ValueError(f"API {api_kind} is not supported")
|
103 |
try:
|
104 |
count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
|
105 |
+
print(prompt_html,'token count is',count_tokens(prompt_html))
|
106 |
history[-1][1] = ""
|
107 |
for character in generate_fn(prompt, history[:-1]):
|
108 |
history[-1][1] = character
|