Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ class Reviewer:
|
|
| 76 |
input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
|
| 77 |
input_text = "This is the paper for your review:" + text[:input_text_index]
|
| 78 |
messages=[
|
| 79 |
-
{"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 +"
|
| 80 |
{"role": "user", "content": input_text},
|
| 81 |
]
|
| 82 |
|
|
@@ -87,7 +87,7 @@ class Reviewer:
|
|
| 87 |
result = ''
|
| 88 |
for choice in response.choices:
|
| 89 |
result += choice.message.content
|
| 90 |
-
result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**',
|
| 91 |
result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
|
| 92 |
print("********"*10)
|
| 93 |
print(result)
|
|
@@ -158,7 +158,9 @@ description = '''<div align='left'>
|
|
| 158 |
|
| 159 |
如果觉得很卡,可以点击右上角的Duplicate this Space,把ChatReviewer复制到你自己的Space中!(🈲:禁止直接复制生成的评论用于任何论文审稿工作!)
|
| 160 |
|
| 161 |
-
本项目的[Github](https://github.com/nishiwen1214/ChatReviewer),欢迎Star和Fork,也欢迎大佬赞助让本项目快速成长!💗
|
|
|
|
|
|
|
| 162 |
</div>
|
| 163 |
'''
|
| 164 |
|
|
@@ -193,7 +195,7 @@ The paper is scored on a scale of 1-10, with 10 being the full mark, and 6 stand
|
|
| 193 |
xxx"""
|
| 194 |
),
|
| 195 |
gradio.inputs.File(label="请上传论文PDF(必填)",type="bytes"),
|
| 196 |
-
gradio.inputs.Radio(choices=["English", "
|
| 197 |
default="English",
|
| 198 |
label="选择输出语言"),
|
| 199 |
]
|
|
|
|
| 76 |
input_text_index = int(len(text)*(self.max_token_num-review_prompt_token)/(text_token+1))
|
| 77 |
input_text = "This is the paper for your review:" + text[:input_text_index]
|
| 78 |
messages=[
|
| 79 |
+
{"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 +" The output language must be {}.".format(self.language)},
|
| 80 |
{"role": "user", "content": input_text},
|
| 81 |
]
|
| 82 |
|
|
|
|
| 87 |
result = ''
|
| 88 |
for choice in response.choices:
|
| 89 |
result += choice.message.content
|
| 90 |
+
result = insert_sentence(result, '**Generated by ChatGPT, no copying allowed!**', 30)
|
| 91 |
result += "\n\n⚠伦理声明/Ethics statement:\n--禁止直接复制生成的评论用于任何论文审稿工作!\n--Direct copying of generated comments for any paper review work is prohibited!"
|
| 92 |
print("********"*10)
|
| 93 |
print(result)
|
|
|
|
| 158 |
|
| 159 |
如果觉得很卡,可以点击右上角的Duplicate this Space,把ChatReviewer复制到你自己的Space中!(🈲:禁止直接复制生成的评论用于任何论文审稿工作!)
|
| 160 |
|
| 161 |
+
本项目的[Github](https://github.com/nishiwen1214/ChatReviewer),欢迎Star和Fork,也欢迎大佬赞助让本项目快速成长!💗
|
| 162 |
+
|
| 163 |
+
**很多人留言没有ChatGPT的API-key....不会申请API的可以加我微信"Shiwen_Ni"(注:本人不卖号,要是真不会的可以找我)**
|
| 164 |
</div>
|
| 165 |
'''
|
| 166 |
|
|
|
|
| 195 |
xxx"""
|
| 196 |
),
|
| 197 |
gradio.inputs.File(label="请上传论文PDF(必填)",type="bytes"),
|
| 198 |
+
gradio.inputs.Radio(choices=["English", "Chinese"],
|
| 199 |
default="English",
|
| 200 |
label="选择输出语言"),
|
| 201 |
]
|