Spaces:
Build error
Build error
print fix, title model switch
Browse filesFiles changed (3)
- app.py+4-1
- src/Surveyor.py+39-35
- src/defaults.py+2-2
41 unmodified lines42434445464741 unmodified linesif __name__ == '__main__':st.container().title('Auto-Research V0.1 - Automated Survey generation from research keywords')global surveyorsurveyor_obj = Surveyor(print_fn=st.write)survey_space(surveyor_obj)41 unmodified lines42434445464748495041 unmodified linesif __name__ == '__main__':st.container().title('Auto-Research V0.1 - Automated Survey generation from research keywords')std_col, survey_col = st.columns(2)std_col.header('execution log:')survey_col.header('Generated_survey:')global surveyorsurveyor_obj = Surveyor(print_fn=std_col.write, survey_print_fn=survey_col.write)survey_space(surveyor_obj)
44 unmodified lines4546474849505123 unmodified lines757677787980261 unmodified lines34234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242344 unmodified lineshigh_gpu=False,refresh_models=False,no_save_models=False,print_fn=None):'''Initializes models and directory structure for the surveyor23 unmodified linesself.print_fn = printif print_fn is not None:self.print_fn = print_fnself.torch_device = 'cpu'self.print_fn("\nTorch_device: " + self.torch_device)261 unmodified linesquery = 'Internal(existing) research'file.write("----------------------------------------------------------------------")file.write("Title: A survey on " + query)self.print_fn("")self.print_fn("----------------------------------------------------------------------")self.print_fn("Title: A survey on " + query)file.write("Author: Auto-Research (github.com/sidphbot/Auto-Research)")self.print_fn("Author: Auto-Research (github.com/sidphbot/Auto-Research)")file.write("Dev: Auto-Research (github.com/sidphbot/Auto-Research)")self.print_fn("Dev: Auto-Research (github.com/sidphbot/Auto-Research)")file.write("Disclaimer: This survey is intended to be a research starter. This Survey is Machine-Summarized, "+"\nhence some sentences might be wrangled or grammatically incorrect. However all sentences are "+"\nmined with proper citations. As All of the text is practically quoted texted, hence to "+"\nimprove visibility, all the papers are duly cited in the Bibiliography section. as bibtex "+"\nentries(only to avoid LaTex overhead). ")self.print_fn("Disclaimer: This survey is intended to be a research starter. This Survey is Machine-Summarized, "+"\nhence some sentences might be wrangled or grammatically incorrect. However all sentences are "+"\nmined with proper citations. As All of the text is practically quoted texted, hence to "+"\nimprove visibility, all the papers are duly cited in the Bibiliography section. as bibtex "+"\nentries(only to avoid LaTex overhead). ")file.write("----------------------------------------------------------------------")self.print_fn("----------------------------------------------------------------------")file.write("")self.print_fn("")file.write('ABSTRACT')self.print_fn('ABSTRACT')self.print_fn("=================================================")file.write("=================================================")file.write("")self.print_fn("")file.write(research_sections['abstract'])self.print_fn(research_sections['abstract'])file.write("")self.print_fn("")file.write('INTRODUCTION')self.print_fn('INTRODUCTION')self.print_fn("=================================================")file.write("=================================================")file.write("")self.print_fn("")file.write(research_sections['introduction'])self.print_fn(research_sections['introduction'])file.write("")self.print_fn("")for k, v in research_sections.items():if k not in ['abstract', 'introduction', 'conclusion']:file.write(k.upper())self.print_fn(k.upper())self.print_fn("=================================================")file.write("=================================================")file.write("")self.print_fn("")file.write(v)self.print_fn(v)file.write("")self.print_fn("")file.write('CONCLUSION')self.print_fn('CONCLUSION')self.print_fn("=================================================")file.write("=================================================")file.write("")self.print_fn("")file.write(research_sections['conclusion'])self.print_fn(research_sections['conclusion'])file.write("")self.print_fn("")file.write('REFERENCES')self.print_fn('REFERENCES')self.print_fn("=================================================")file.write("=================================================")file.write("")self.print_fn("")for entry in bibentries:file.write(entry)self.print_fn(entry)file.write("")self.print_fn("")self.print_fn("========================XXX=========================")file.write("========================XXX=========================")file.close()44 unmodified lines454647484950515223 unmodified lines767778798081828384261 unmodified lines34634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642744 unmodified lineshigh_gpu=False,refresh_models=False,no_save_models=False,print_fn=None,survey_print_fn=None):'''Initializes models and directory structure for the surveyor23 unmodified linesself.print_fn = printif print_fn is not None:self.print_fn = print_fnself.survey_print_fn = self.print_fnif survey_print_fn is not None:self.survey_print_fn = survey_print_fnself.torch_device = 'cpu'self.print_fn("\nTorch_device: " + self.torch_device)261 unmodified linesquery = 'Internal(existing) research'file.write("----------------------------------------------------------------------")file.write("Title: A survey on " + query)self.survey_print_fn("")self.survey_print_fn("----------------------------------------------------------------------")self.survey_print_fn("Title: A survey on " + query)file.write("Author: Auto-Research (github.com/sidphbot/Auto-Research)")self.survey_print_fn("Author: Auto-Research (github.com/sidphbot/Auto-Research)")file.write("Dev: Auto-Research (github.com/sidphbot/Auto-Research)")self.survey_print_fn("Dev: Auto-Research (github.com/sidphbot/Auto-Research)")file.write("Disclaimer: This survey is intended to be a research starter. This Survey is Machine-Summarized, "+"\nhence some sentences might be wrangled or grammatically incorrect. However all sentences are "+"\nmined with proper citations. As All of the text is practically quoted texted, hence to "+"\nimprove visibility, all the papers are duly cited in the Bibiliography section. as bibtex "+"\nentries(only to avoid LaTex overhead). ")self.survey_print_fn("Disclaimer: This survey is intended to be a research starter. This Survey is Machine-Summarized, "+"\nhence some sentences might be wrangled or grammatically incorrect. However all sentences are "+"\nmined with proper citations. As All of the text is practically quoted texted, hence to "+"\nimprove visibility, all the papers are duly cited in the Bibiliography section. as bibtex "+"\nentries(only to avoid LaTex overhead). ")file.write("----------------------------------------------------------------------")self.survey_print_fn("----------------------------------------------------------------------")file.write("")self.survey_print_fn("")file.write('ABSTRACT')self.survey_print_fn('ABSTRACT')self.survey_print_fn("=================================================")file.write("=================================================")file.write("")self.survey_print_fn("")file.write(research_sections['abstract'])self.survey_print_fn(research_sections['abstract'])file.write("")self.survey_print_fn("")file.write('INTRODUCTION')self.survey_print_fn('INTRODUCTION')self.survey_print_fn("=================================================")file.write("=================================================")file.write("")self.survey_print_fn("")file.write(research_sections['introduction'])self.survey_print_fn(research_sections['introduction'])file.write("")self.survey_print_fn("")for k, v in research_sections.items():if k not in ['abstract', 'introduction', 'conclusion']:file.write(k.upper())self.survey_print_fn(k.upper())self.survey_print_fn("=================================================")file.write("=================================================")file.write("")self.survey_print_fn("")file.write(v)self.survey_print_fn(v)file.write("")self.survey_print_fn("")file.write('CONCLUSION')self.survey_print_fn('CONCLUSION')self.survey_print_fn("=================================================")file.write("=================================================")file.write("")self.survey_print_fn("")file.write(research_sections['conclusion'])self.survey_print_fn(research_sections['conclusion'])file.write("")self.survey_print_fn("")file.write('REFERENCES')self.survey_print_fn('REFERENCES')self.survey_print_fn("=================================================")file.write("=================================================")file.write("")self.survey_print_fn("")for entry in bibentries:file.write(entry)self.survey_print_fn(entry)file.write("")self.survey_print_fn("")self.survey_print_fn("========================XXX=========================")file.write("========================XXX=========================")file.close()
27 unmodified lines28293031323334353627 unmodified lines"tab_dir": "arxiv_data/tables/","dump_dir": "arxiv_dumps/","models_dir": "saved_models/","title_model_name": "ccdv/lsg-bart-base-4096-arxiv","ex_summ_model_name": "allenai/scibert_scivocab_uncased","ledmodel_name": "bhuvaneswari/t5-small-text_summarization","embedder_name": "paraphrase-MiniLM-L6-v2","nlp_name": "en_core_sci_scibert","similarity_nlp_name": "en_core_sci_lg",27 unmodified lines28293031323334353627 unmodified lines"tab_dir": "arxiv_data/tables/","dump_dir": "arxiv_dumps/","models_dir": "saved_models/","title_model_name": "Callidior/bert2bert-base-arxiv-titlegen","ex_summ_model_name": "allenai/scibert_scivocab_uncased","ledmodel_name": "ccdv/lsg-bart-base-4096-arxiv","embedder_name": "paraphrase-MiniLM-L6-v2","nlp_name": "en_core_sci_scibert","similarity_nlp_name": "en_core_sci_lg",
app.py+4-1
src/Surveyor.py+39-35
src/defaults.py+2-2