撤回了mathjax本地化

This commit is contained in:
xunbu
2025-05-26 12:39:45 +08:00
parent 0b40d96222
commit 76e56532e2
8 changed files with 95 additions and 92 deletions

View File

@@ -119,7 +119,6 @@ async def _perform_translation(params: Dict[str, Any], file_contents: bytes, ori
model_id=params['model_id'],
convert_engin=params['convert_engin'],
mineru_token=params['mineru_token'],
tips=False # Assuming tips are not needed for server-side processing
)
await ft.translate_bytes_async(
name=original_filename,
@@ -376,10 +375,12 @@ async def get_logs_from_queue():
async def download_markdown(filename_with_ext: str):
if not current_state["download_ready"] or not current_state["markdown_content"] or not current_state[
"original_filename_stem"]:
print("Markdown 内容尚未准备好或不可用。")
raise HTTPException(status_code=404, detail="Markdown 内容尚未准备好或不可用。")
requested_stem = Path(filename_with_ext).stem.replace("_translated", "")
if requested_stem != current_state["original_filename_stem"]:
print("请求的文件名与当前结果不符。")
raise HTTPException(status_code=404, detail="请求的文件名与当前结果不符。")
actual_filename = f"{current_state['original_filename_stem']}_translated.md"