ShiwenNi commited on
Commit
d41c42e
1 Parent(s): 5b8981f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -22,12 +22,6 @@ class Reviewer:
22
 
23
  self.max_token_num = 4096
24
  self.encoding = tiktoken.get_encoding("gpt2")
25
-
26
- def validateTitle(self, title):
27
- # 修正论文的路径格式
28
- rstr = r"[\/\\\:\*\?\"\<\>\|]" # '/ \ : * ? " < > |'
29
- new_title = re.sub(rstr, "_", title) # 替换为下划线
30
- return new_title
31
 
32
 
33
  def review_by_chatgpt(self, paper_list):
@@ -131,7 +125,7 @@ def main(api, review_format, paper_pdf, language):
131
  # 开始判断是路径还是文件:
132
  comments, total_token_used = reviewer1.review_by_chatgpt(paper_list=paper_list)
133
  time_used = time.time() - start_time
134
- output2 ="使用token数:"+ str(total_token_used)+"\n花费时间:"+ str(time_used) +"秒"
135
  return comments, output2
136
 
137
 
@@ -160,7 +154,7 @@ inp = [gradio.inputs.Textbox(label="请输入你的API-key(sk开头的字符串)
160
  default="",
161
  type='password'),
162
  gradio.inputs.Textbox(
163
- label="请输入特定的审稿格式",
164
  default="""* Overall Review
165
  Please briefly summarize the main points and contributions of this paper.
166
  xxx
 
22
 
23
  self.max_token_num = 4096
24
  self.encoding = tiktoken.get_encoding("gpt2")
 
 
 
 
 
 
25
 
26
 
27
  def review_by_chatgpt(self, paper_list):
 
125
  # 开始判断是路径还是文件:
126
  comments, total_token_used = reviewer1.review_by_chatgpt(paper_list=paper_list)
127
  time_used = time.time() - start_time
128
+ output2 ="使用token数:"+ str(total_token_used)+"\n花费时间:"+ str(round(time_used, 2)) +"秒"
129
  return comments, output2
130
 
131
 
 
154
  default="",
155
  type='password'),
156
  gradio.inputs.Textbox(
157
+ label="请输入特定的评审要求和格式",
158
  default="""* Overall Review
159
  Please briefly summarize the main points and contributions of this paper.
160
  xxx