Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,8 +31,8 @@ def text_prompt(request, system_role, page_url, contraseña, temp):
|
|
31 |
for sentence in sentences:
|
32 |
tokens.extend(tokenizer.tokenize(sentence))
|
33 |
|
34 |
-
# Trim text to a maximum of
|
35 |
-
if len(tokens) >
|
36 |
break
|
37 |
page_text += sentence + ". "
|
38 |
|
|
|
31 |
for sentence in sentences:
|
32 |
tokens.extend(tokenizer.tokenize(sentence))
|
33 |
|
34 |
+
# Trim text to a maximum of 3100 tokens
|
35 |
+
if len(tokens) > 3100:
|
36 |
break
|
37 |
page_text += sentence + ". "
|
38 |
|