ShiwenNi commited on
Commit
07babb9
1 Parent(s): 803d7a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,7 +55,7 @@ class Reviewer:
55
  self.api_base = api_base
56
  self.language = language
57
  self.paper_pdf = paper_pdf
58
- self.max_token_num = 32000
59
  self.encoding = tiktoken.get_encoding("gpt2")
60
 
61
 
@@ -94,7 +94,7 @@ class Reviewer:
94
  result += choice.message.content
95
  result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**', 50)
96
  result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
97
- usage = response.usage.total_tokens
98
  except Exception as e:
99
  # 处理其他的异常
100
  result = "⚠:非常抱歉>_<,生了一个错误:"+ str(e)
 
55
  self.api_base = api_base
56
  self.language = language
57
  self.paper_pdf = paper_pdf
58
+ self.max_token_num = 50000
59
  self.encoding = tiktoken.get_encoding("gpt2")
60
 
61
 
 
94
  result += choice.message.content
95
  result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**', 50)
96
  result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
97
+ usage = response.usage.total_tokens + input_text_index
98
  except Exception as e:
99
  # 处理其他的异常
100
  result = "⚠:非常抱歉>_<,生了一个错误:"+ str(e)