ShiwenNi commited on
Commit
209171a
1 Parent(s): 3707ebe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,8 +61,8 @@ class Reviewer:
61
  pass
62
  text += 'Abstract: ' + paper_Abstract
63
  text_token = len(self.encoding.encode(text))
64
- if text_token > self.max_token_num/2 - 800:
65
- input_text_index = int(len(text)*((self.max_token_num/2)-500)/text_token)
66
  text = text[:input_text_index]
67
  openai.api_key = self.api
68
  messages = [
 
61
  pass
62
  text += 'Abstract: ' + paper_Abstract
63
  text_token = len(self.encoding.encode(text))
64
+ if text_token > self.max_token_num/2 - 1000:
65
+ input_text_index = int(len(text)*((self.max_token_num/2)-1000)/text_token)
66
  text = text[:input_text_index]
67
  openai.api_key = self.api
68
  messages = [