geekocean commited on
Commit
12e36b3
1 Parent(s): 93acf0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -79,8 +79,8 @@ class Reviewer:
79
  input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
80
  input_text = "This is the paper for your review:" + text[:input_text_index]
81
  messages=[
82
- {"role": "system", "content": "You are a professional reviewer. Now I will give you a paper. You need to give a complete review opinion according to the following requirements and format:"+ self.review_format + "Be sure to use {} answers".format(self.language)} ,
83
- {"role": "user", "content": input_text + " Translate the output into {}.".format(self.language)},
84
  ]
85
  try:
86
  response = openai.ChatCompletion.create(
@@ -153,10 +153,7 @@ def main(api, review_format, paper_pdf, language):
153
  title = "🤖ChatReviewer🤖"
154
  # 描述
155
 
156
- description = '''<div align='left'>
157
- 🤖ChatReviewer🤖
158
- </div>
159
- '''
160
 
161
  # 创建Gradio界面
162
  inp = [gradio.inputs.Textbox(label="请输入你的API-key(sk开头的字符串)",
@@ -189,9 +186,6 @@ The paper is scored on a scale of 1-10, with 10 being the full mark, and 6 stand
189
  xxx"""
190
  ),
191
  gradio.inputs.File(label="请上传论文PDF文件(请务必等pdf上传完成后再点击Submit!)",type="bytes"),
192
- gradio.inputs.Radio(choices=["English", "Chinese", "French", "German","Japenese"],
193
- default="English",
194
- label="选择输出语言"),
195
  ]
196
 
197
  chat_reviewer_gui = gradio.Interface(fn=main,
 
79
  input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
80
  input_text = "This is the paper for your review:" + text[:input_text_index]
81
  messages=[
82
+ {"role": "system", "content": "You are a professional reviewer. Now I will give you a paper. You need to give a complete review opinion according to the following requirements and format:"+ self.review_format + "Be sure to use Chinese answers"} ,
83
+ {"role": "user", "content": input_text + " Translate the output into Chinese."},
84
  ]
85
  try:
86
  response = openai.ChatCompletion.create(
 
153
  title = "🤖ChatReviewer🤖"
154
  # 描述
155
 
156
+ description = ""
 
 
 
157
 
158
  # 创建Gradio界面
159
  inp = [gradio.inputs.Textbox(label="请输入你的API-key(sk开头的字符串)",
 
186
  xxx"""
187
  ),
188
  gradio.inputs.File(label="请上传论文PDF文件(请务必等pdf上传完成后再点击Submit!)",type="bytes"),
 
 
 
189
  ]
190
 
191
  chat_reviewer_gui = gradio.Interface(fn=main,