dromerosm commited on
Commit
4dcca54
·
1 Parent(s): b5b699f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,8 +38,8 @@ def text_prompt(page_url, contraseña, temp):
38
  for sentence in sentences:
39
  tokens.extend(tokenizer.tokenize(sentence))
40
 
41
- # Trim text to a maximum of 3100 tokens
42
- if len(tokens) > 3100:
43
  break
44
  page_text += sentence + ". "
45
 
@@ -58,7 +58,7 @@ def text_prompt(page_url, contraseña, temp):
58
  {"role": "system", "content": system_role},
59
  {"role": "user", "content": request + "\n\n" + 'Text:\n\n"' + page_text + '\n"'}
60
  ],
61
- max_tokens=512,
62
  temperature=temp,
63
  top_p=1.0,
64
  )
 
38
  for sentence in sentences:
39
  tokens.extend(tokenizer.tokenize(sentence))
40
 
41
+ # Trim text to a maximum of 3000 tokens
42
+ if len(tokens) > 3000:
43
  break
44
  page_text += sentence + ". "
45
 
 
58
  {"role": "system", "content": system_role},
59
  {"role": "user", "content": request + "\n\n" + 'Text:\n\n"' + page_text + '\n"'}
60
  ],
61
+ max_tokens=1024,
62
  temperature=temp,
63
  top_p=1.0,
64
  )