wangrongsheng commited on
Commit
912e540
1 Parent(s): 6e5d210

优化:中文->英文

Browse files
Files changed (1) hide show
  1. app.py +38 -50
app.py CHANGED
@@ -523,16 +523,16 @@ class Reader:
523
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的审稿人,你需要严格评审这篇文章"}, # chatgpt 角色
524
  {"role": "assistant", "content": "这是一篇英文文献的<summary>和<conclusion>部分内容,其中<summary>你已经总结好了,但是<conclusion>部分,我需要你帮忙归纳下面问题:"+text}, # 背景知识,可以参考OpenReview的审稿流程
525
  {"role": "user", "content": """
526
- 8. 做出如下总结:
527
- - (1):这篇工作的意义如何?
528
- - (2):从创新点、性能、工作量这三个维度,总结这篇文章的优点和缺点。
529
  .......
530
- 按照后面的格式输出:
531
- 8. Conclusion:
532
- - (1):xxx;
533
- - (2):创新点: xxx; 性能: xxx; 工作量: xxx;
534
 
535
- 务必使用中文回答(专有名词需要用英文标注),语句尽量简洁且学术,不要和之前的<summary>内容重复,数值使用原文数字, 务必严格按照格式,将对应内容输出到xxx中,.......代表按照实际需求填写,如果没有可以不用写.
536
  """},
537
  ]
538
  )
@@ -553,19 +553,19 @@ class Reader:
553
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的科研人员,善于使用精炼的语句总结论文"}, # chatgpt 角色
554
  {"role": "assistant", "content": "这是一篇英文文献的<summary>和<Method>部分内容,其中<summary>你已经总结好了,但是<Methods>部分,我需要你帮忙阅读并归纳下面问题:"+text}, # 背景知识
555
  {"role": "user", "content": """
556
- 7. 详细描述这篇文章的方法思路。比如说它的步骤是:
557
  - (1):...
558
  - (2):...
559
  - (3):...
560
  - .......
561
- 按照后面的格式输出:
562
- 7. Methods:
563
- - (1):xxx;
564
- - (2):xxx;
565
- - (3):xxx;
566
- .......
567
 
568
- 务必使用中文回答(专有名词需要用英文标注),语句尽量简洁且学术,不要和之前的<summary>内容重复,数值使用原文数字, 务必严格按照格式,将对应内容输出到xxx中,按照\n换行,.......代表按照实际需求填写,如果没有可以不用写.
569
  """},
570
  ]
571
  )
@@ -586,29 +586,29 @@ class Reader:
586
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的科研人员,善于使用精炼的语句总结论文"}, # chatgpt 角色
587
  {"role": "assistant", "content": "这是一篇英文文献的标题,作者,链接,Abstract和Introduction部分内容,我需要你帮忙���读并归纳下面问题:"+text}, # 背景知识
588
  {"role": "user", "content": """
589
- 1. 标记出这篇文献的标题(加上中文翻译)
590
- 2. 列举所有的作者姓名 (使用英文)
591
- 3. 标记第一作者的单位(只输出中文翻译)
592
- 4. 标记出这篇文章的关键词(使用英文)
593
- 5. 论文链接,Github代码链接(如果有的话,没有的话请填写Github:None
594
- 6. 按照下面四个点进行总结:
595
- - (1):这篇文章的研究背景是什么?
596
- - (2):过去的方法有哪些?它们存在什么问题?本文和过去的研究有哪些本质的区别?Is the approach well motivated?
597
- - (3):本文提出的研究方法是什么?
598
- - (4):本文方法在什么任务上,取得了什么性能?性能能否支持他们的目标?
599
- 按照后面的格式输出:
600
- 1. Title: xxx
601
- 2. Authors: xxx
602
- 3. Affiliation: xxx
603
- 4. Keywords: xxx
604
- 5. Urls: xxx or xxx , xxx
605
- 6. Summary:
606
- - (1):xxx;
607
- - (2):xxx;
608
- - (3):xxx;
609
- - (4):xxx.
610
 
611
- 务必使用中文回答(专有名词需要用英文标注),语句尽量简洁且学术,不要有太多重复的信息,数值使用原文数字, 务必严格按照格式,将对应内容输出到xxx中,按照\n换行.
612
  """},
613
  ]
614
  )
@@ -649,17 +649,11 @@ def upload_pdf(key, text, file):
649
 
650
  api_title = "api-key可用验证"
651
  api_description = '''<div align='left'>
652
-
653
  <img src='https://visitor-badge.laobi.icu/badge?page_id=https://huggingface.co/spaces/wangrongsheng/ChatPaper'>
654
-
655
  <img align='right' src='https://i.328888.xyz/2023/03/12/vH9dU.png' width="150">
656
-
657
  Use ChatGPT to summary the papers.Star our Github [🌟ChatPaper](https://github.com/kaixindelele/ChatPaper) .
658
-
659
  💗如果您觉得我们的项目对您有帮助,还请您给我们一些鼓励!💗
660
-
661
  🔴请注意:千万不要用于严肃的学术场景,只能用于论文阅读前的初筛!
662
-
663
  </div>
664
  '''
665
 
@@ -672,17 +666,11 @@ api_gui = gradio.Interface(fn=valid_apikey, inputs=api_input, outputs="text", ti
672
  title = "ChatPaper"
673
  # 描述
674
  description = '''<div align='left'>
675
-
676
  <img src='https://visitor-badge.laobi.icu/badge?page_id=https://huggingface.co/spaces/wangrongsheng/ChatPaper'>
677
-
678
  <img align='right' src='https://i.328888.xyz/2023/03/12/vH9dU.png' width="200">
679
-
680
  Use ChatGPT to summary the papers.Star our Github [🌟ChatPaper](https://github.com/kaixindelele/ChatPaper) .
681
-
682
  💗如果您觉得我们的项目对您有帮助,还请您给我们一些鼓励!💗
683
-
684
  🔴请注意:千万不要用于严肃的学术场景,只能用于论文阅读前的初筛!
685
-
686
  </div>
687
  '''
688
  # 创建Gradio界面
 
523
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的审稿人,你需要严格评审这篇文章"}, # chatgpt 角色
524
  {"role": "assistant", "content": "这是一篇英文文献的<summary>和<conclusion>部分内容,其中<summary>你已经总结好了,但是<conclusion>部分,我需要你帮忙归纳下面问题:"+text}, # 背景知识,可以参考OpenReview的审稿流程
525
  {"role": "user", "content": """
526
+ 8. Make the following summary.Be sure to use Chinese answers (proper nouns need to be marked in English).
527
+ - (1):What is the significance of this piece of work?
528
+ - (2):Summarize the strengths and weaknesses of this article in three dimensions: innovation point, performance, and workload.
529
  .......
530
+ Follow the format of the output later:
531
+ 8. Conclusion: \n\n
532
+ - (1):xxx;\n
533
+ - (2):Innovation point: xxx; Performance: xxx; Workload: xxx;\n
534
 
535
+ Be sure to use Chinese answers (proper nouns need to be marked in English), statements as concise and academic as possible, do not repeat the content of the previous <summary>, the value of the use of the original numbers, be sure to strictly follow the format, the corresponding content output to xxx, in accordance with \n line feed, ....... means fill in according to the actual requirements, if not, you can not write.
536
  """},
537
  ]
538
  )
 
553
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的科研人员,善于使用精炼的语句总结论文"}, # chatgpt 角色
554
  {"role": "assistant", "content": "这是一篇英文文献的<summary>和<Method>部分内容,其中<summary>你已经总结好了,但是<Methods>部分,我需要你帮忙阅读并归纳下面问题:"+text}, # 背景知识
555
  {"role": "user", "content": """
556
+ 7. Describe in detail the methodological idea of this article. Be sure to use Chinese answers (proper nouns need to be marked in English). For example, its steps are.
557
  - (1):...
558
  - (2):...
559
  - (3):...
560
  - .......
561
+ Follow the format of the output that follows:
562
+ 7. Methods: \n\n
563
+ - (1):xxx;\n
564
+ - (2):xxx;\n
565
+ - (3):xxx;\n
566
+ ....... \n\n
567
 
568
+ Be sure to use Chinese answers (proper nouns need to be marked in English), statements as concise and academic as possible, do not repeat the content of the previous <summary>, the value of the use of the original numbers, be sure to strictly follow the format, the corresponding content output to xxx, in accordance with \n line feed, ....... means fill in according to the actual requirements, if not, you can not write.
569
  """},
570
  ]
571
  )
 
586
  {"role": "system", "content": "你是一个["+self.key_word+"]领域的科研人员,善于使用精炼的语句总结论文"}, # chatgpt 角色
587
  {"role": "assistant", "content": "这是一篇英文文献的标题,作者,链接,Abstract和Introduction部分内容,我需要你帮忙���读并归纳下面问题:"+text}, # 背景知识
588
  {"role": "user", "content": """
589
+ 1. Mark the title of the paper (with Chinese translation)
590
+ 2. list all the authors' names (use English)
591
+ 3. mark the first author's affiliation (output Chinese translation only)
592
+ 4. mark the keywords of this article (use English)
593
+ 5. link to the paper, Github code link (if available, fill in Github:None if not)
594
+ 6. summarize according to the following four points.Be sure to use Chinese answers (proper nouns need to be marked in English)
595
+ - (1):What is the research background of this article?
596
+ - (2):What are the past methods? What are the problems with them? Is the approach well motivated?
597
+ - (3):What is the research methodology proposed in this paper?
598
+ - (4):On what task and what performance is achieved by the methods in this paper? Can the performance support their goals?
599
+ Follow the format of the output that follows:
600
+ 1. Title: xxx\n\n
601
+ 2. Authors: xxx\n\n
602
+ 3. Affiliation: xxx\n\n
603
+ 4. Keywords: xxx\n\n
604
+ 5. Urls: xxx or xxx , xxx \n\n
605
+ 6. Summary: \n\n
606
+ - (1):xxx;\n
607
+ - (2):xxx;\n
608
+ - (3):xxx;\n
609
+ - (4):xxx.\n\n
610
 
611
+ Be sure to use Chinese answers (proper nouns need to be marked in English), statements as concise and academic as possible, do not have too much repetitive information, numerical values using the original numbers, be sure to strictly follow the format, the corresponding content output to xxx, in accordance with \n line feed.
612
  """},
613
  ]
614
  )
 
649
 
650
  api_title = "api-key可用验证"
651
  api_description = '''<div align='left'>
 
652
  <img src='https://visitor-badge.laobi.icu/badge?page_id=https://huggingface.co/spaces/wangrongsheng/ChatPaper'>
 
653
  <img align='right' src='https://i.328888.xyz/2023/03/12/vH9dU.png' width="150">
 
654
  Use ChatGPT to summary the papers.Star our Github [🌟ChatPaper](https://github.com/kaixindelele/ChatPaper) .
 
655
  💗如果您觉得我们的项目对您有帮助,还请您给我们一些鼓励!💗
 
656
  🔴请注意:千万不要用于严肃的学术场景,只能用于论文阅读前的初筛!
 
657
  </div>
658
  '''
659
 
 
666
  title = "ChatPaper"
667
  # 描述
668
  description = '''<div align='left'>
 
669
  <img src='https://visitor-badge.laobi.icu/badge?page_id=https://huggingface.co/spaces/wangrongsheng/ChatPaper'>
 
670
  <img align='right' src='https://i.328888.xyz/2023/03/12/vH9dU.png' width="200">
 
671
  Use ChatGPT to summary the papers.Star our Github [🌟ChatPaper](https://github.com/kaixindelele/ChatPaper) .
 
672
  💗如果您觉得我们的项目对您有帮助,还请您给我们一些鼓励!💗
 
673
  🔴请注意:千万不要用于严肃的学术场景,只能用于论文阅读前的初筛!
 
674
  </div>
675
  '''
676
  # 创建Gradio界面