Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,10 @@ def text_prompt(request, page_url, contraseña, temp):
|
|
22 |
|
23 |
# Recortar el texto a un máximo de 1000 tokens
|
24 |
num_tokens = len(tokens)
|
|
|
25 |
if num_tokens > 1800:
|
26 |
-
|
|
|
27 |
page_text = " ".join(tokens)
|
28 |
|
29 |
if num_tokens > 10:
|
|
|
22 |
|
23 |
# Recortar el texto a un máximo de 1000 tokens
|
24 |
num_tokens = len(tokens)
|
25 |
+
|
26 |
if num_tokens > 1800:
|
27 |
+
tokens = tokens[:1800]
|
28 |
+
|
29 |
page_text = " ".join(tokens)
|
30 |
|
31 |
if num_tokens > 10:
|