add comparison pdf file save and load
This commit is contained in:
parent
900fad69cf
commit
ecaf2bdf45
@ -416,6 +416,8 @@ def 编译Latex(chatbot, history, main_file_original, main_file_modified, work_f
|
|||||||
from .latex_toolbox import merge_pdfs
|
from .latex_toolbox import merge_pdfs
|
||||||
concat_pdf = pj(work_folder_modified, f'comparison.pdf')
|
concat_pdf = pj(work_folder_modified, f'comparison.pdf')
|
||||||
merge_pdfs(origin_pdf, result_pdf, concat_pdf)
|
merge_pdfs(origin_pdf, result_pdf, concat_pdf)
|
||||||
|
if os.path.exists(pj(work_folder, '..', 'translation')):
|
||||||
|
shutil.copyfile(concat_pdf, pj(work_folder, '..', 'translation', 'comparison.pdf'))
|
||||||
promote_file_to_downloadzone(concat_pdf, rename_file=None, chatbot=chatbot) # promote file to web UI
|
promote_file_to_downloadzone(concat_pdf, rename_file=None, chatbot=chatbot) # promote file to web UI
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user