ShiwenNi commited on
Commit
55ccffd
1 Parent(s): 3cd5af6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -54,8 +54,8 @@ class Reviewer:
54
  result = ''
55
  for choice in response.choices:
56
  result += choice.message.content
57
- result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**', 10)
58
- result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
59
  print("********"*10)
60
  print(result)
61
  print("********"*10)
@@ -66,13 +66,13 @@ class Reviewer:
66
 
67
  return result, response.usage.total_tokens
68
 
69
- def contains_chinese(self,text):
70
  for ch in text:
71
  if u'\u4e00' <= ch <= u'\u9fff':
72
  return True
73
  return False
74
 
75
- def insert_sentence(self,text, sentence, interval):
76
  if contains_chinese(text):
77
  words = list(jieba.cut(text))
78
  separator = ''
 
54
  result = ''
55
  for choice in response.choices:
56
  result += choice.message.content
57
+ result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**', 10)
58
+ result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
59
  print("********"*10)
60
  print(result)
61
  print("********"*10)
 
66
 
67
  return result, response.usage.total_tokens
68
 
69
+ def contains_chinese(self, text):
70
  for ch in text:
71
  if u'\u4e00' <= ch <= u'\u9fff':
72
  return True
73
  return False
74
 
75
+ def insert_sentence(self, text, sentence, interval):
76
  if contains_chinese(text):
77
  words = list(jieba.cut(text))
78
  separator = ''