produce comparison pdf cache

This commit is contained in:
qingxu fu 2023-11-30 22:21:44 +08:00
parent 55d807c116
commit 900fad69cf

View File

@ -88,6 +88,9 @@ def arxiv_download(chatbot, history, txt, allow_cache=True):
target_file = pj(translation_dir, 'translate_zh.pdf') target_file = pj(translation_dir, 'translate_zh.pdf')
if os.path.exists(target_file): if os.path.exists(target_file):
promote_file_to_downloadzone(target_file, rename_file=None, chatbot=chatbot) promote_file_to_downloadzone(target_file, rename_file=None, chatbot=chatbot)
target_file_compare = pj(translation_dir, 'comparison.pdf')
if os.path.exists(target_file_compare):
promote_file_to_downloadzone(target_file_compare, rename_file=None, chatbot=chatbot)
return target_file return target_file
return False return False
def is_float(s): def is_float(s):