shaocongma commited on
Commit
b4c6c2b
1 Parent(s): 01ff6d9

First commit.

Browse files
Files changed (2) hide show
  1. app.py +6 -2
  2. utils/tex_processing.py +4 -2
app.py CHANGED
@@ -13,11 +13,14 @@ from utils.file_operations import hash_name
13
  # 5.3 Use embedding to find most related papers (find a paper dataset)
14
  # 6. get logs when the procedure is not completed.
15
  # 7. 自己的文件库; 更多的prompts
16
- # 11. distinguish citep and citet
 
17
  # future:
18
  # 8. Change prompts to langchain
19
  # 4. add auto_polishing function
20
  # 12. Change link to more appealing color # after the website is built;
 
 
21
 
22
  openai_key = os.getenv("OPENAI_API_KEY")
23
  access_key_id = os.getenv('AWS_ACCESS_KEY_ID')
@@ -117,7 +120,8 @@ with gr.Blocks(theme=theme) as demo:
117
  # label="Selection", info="目前支持生成'学术论文'和'文献总结'.", interactive=True)
118
  title = gr.Textbox(value="Playing Atari with Deep Reinforcement Learning", lines=1, max_lines=1,
119
  label="Title", info="论文标题")
120
- description = gr.Textbox(lines=5, label="Description (Optional)", visible=False)
 
121
 
122
  with gr.Row():
123
  clear_button = gr.Button("Clear")
 
13
  # 5.3 Use embedding to find most related papers (find a paper dataset)
14
  # 6. get logs when the procedure is not completed.
15
  # 7. 自己的文件库; 更多的prompts
16
+ # 8. Decide on how to generate the main part of a paper
17
+ # 9. Load .bibtex file to generate a pre-defined references list.
18
  # future:
19
  # 8. Change prompts to langchain
20
  # 4. add auto_polishing function
21
  # 12. Change link to more appealing color # after the website is built;
22
+ # 1. Check if there are any duplicated citations
23
+ # 2. Remove potential thebibliography and bibitem in .tex file
24
 
25
  openai_key = os.getenv("OPENAI_API_KEY")
26
  access_key_id = os.getenv('AWS_ACCESS_KEY_ID')
 
120
  # label="Selection", info="目前支持生成'学术论文'和'文献总结'.", interactive=True)
121
  title = gr.Textbox(value="Playing Atari with Deep Reinforcement Learning", lines=1, max_lines=1,
122
  label="Title", info="论文标题")
123
+ description = gr.Textbox(lines=5, label="Description (Optional)", visible=True,
124
+ info="对希望生成的论文的一些描述. 包括这篇论文的创新点, 主要贡献, 等.")
125
 
126
  with gr.Row():
127
  clear_button = gr.Button("Clear")
utils/tex_processing.py CHANGED
@@ -19,11 +19,13 @@ def replace_title(save_to_path, title):
19
  outfile.write(content)
20
 
21
 
22
- # return all string in \cite{...}.
23
 
24
  # check if citations are in bibtex.
25
 
26
 
27
  # replace citations
28
 
29
- # sometimes the output may include thebibliography and bibitem . remove all of it.
 
 
 
19
  outfile.write(content)
20
 
21
 
22
+ # return all string in \cite{...} \citet{...} or \citep{...}.
23
 
24
  # check if citations are in bibtex.
25
 
26
 
27
  # replace citations
28
 
29
+ # sometimes the output may include thebibliography and bibitem . remove all of it.
30
+
31
+