sidphbot commited on
Commit
524154e
1 Parent(s): 447f052

UI changes

Browse files
Files changed (1) hide show
  1. app.py +15 -16
app.py CHANGED
@@ -60,13 +60,27 @@ class ArxivIDsModel(BaseModel):
60
 
61
 
62
  def survey_space(surveyor, download_placeholder):
 
 
 
 
 
 
 
 
 
 
 
 
63
  with st.sidebar.form(key="survey_keywords_form"):
64
  session_data = sp.pydantic_input(key="keywords_input_model", model=KeywordsModel)
65
  st.write('or')
66
  session_data.update(sp.pydantic_input(key="arxiv_ids_input_model", model=ArxivIDsModel))
67
  submit = st.form_submit_button(label="Submit")
 
68
 
69
- run_kwargs = {'surveyor':surveyor, 'download_placeholder':download_placeholder}
 
70
  if submit:
71
  if session_data['research_keywords'] != '':
72
  run_kwargs.update({'research_keywords':session_data['research_keywords'],
@@ -75,18 +89,3 @@ def survey_space(surveyor, download_placeholder):
75
  elif session_data['arxiv_ids'] != '':
76
  run_kwargs.update({'arxiv_ids':[id.strip() for id in session_data['arxiv_ids'].split(',')]})
77
  run_survey(**run_kwargs)
78
-
79
-
80
- if __name__ == '__main__':
81
- st.sidebar.image(Image.open('logo_landscape.png'), use_column_width = 'always')
82
- st.title('Auto-Research')
83
- st.write('#### A no-code utility to generate a detailed well-cited survey with topic clustered sections'
84
- '(draft paper format) and other interesting artifacts from a single research query or a curated set of papers(arxiv ids).')
85
- st.write('##### Data Provider: arXiv Open Archive Initiative OAI')
86
- st.write('##### GitHub: https://github.com/sidphbot/Auto-Research')
87
- survey_row = st.container()
88
- download_placeholder = st.container()
89
- std_row = st.container()
90
- std_row.write('#### execution log:')
91
- surveyor_obj = get_surveyor_instance(_print_fn=std_row.write, _survey_print_fn=survey_row.write)
92
- survey_space(surveyor_obj, download_placeholder)
 
60
 
61
 
62
  def survey_space(surveyor, download_placeholder):
63
+
64
+
65
+
66
+ if __name__ == '__main__':
67
+ st.sidebar.image(Image.open('logo_landscape.png'), use_column_width = 'always')
68
+ st.title('Auto-Research')
69
+ st.write('#### A no-code utility to generate a detailed well-cited survey with topic clustered sections'
70
+ '(draft paper format) and other interesting artifacts from a single research query or a curated set of papers(arxiv ids).')
71
+ st.write('##### Data Provider: arXiv Open Archive Initiative OAI')
72
+ st.write('##### GitHub: https://github.com/sidphbot/Auto-Research')
73
+ download_placeholder = st.container()
74
+
75
  with st.sidebar.form(key="survey_keywords_form"):
76
  session_data = sp.pydantic_input(key="keywords_input_model", model=KeywordsModel)
77
  st.write('or')
78
  session_data.update(sp.pydantic_input(key="arxiv_ids_input_model", model=ArxivIDsModel))
79
  submit = st.form_submit_button(label="Submit")
80
+ st.sidebar.write('#### execution log:')
81
 
82
+ run_kwargs = {'surveyor':get_surveyor_instance(_print_fn=st.sidebar.write, _survey_print_fn=st.write),
83
+ 'download_placeholder':download_placeholder}
84
  if submit:
85
  if session_data['research_keywords'] != '':
86
  run_kwargs.update({'research_keywords':session_data['research_keywords'],
 
89
  elif session_data['arxiv_ids'] != '':
90
  run_kwargs.update({'arxiv_ids':[id.strip() for id in session_data['arxiv_ids'].split(',')]})
91
  run_survey(**run_kwargs)