GuXiaopeng commited on
Commit
216227b
·
verified ·
1 Parent(s): 7f474f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -488,7 +488,7 @@ if st.session_state.start_pipeline or st.session_state.resume_pipeline:
488
  structure = [sec for sec in plan.get("structure", []) if sec.get("section", "").strip().lower() not in META_SECTIONS_BLACKLIST]
489
 
490
  en_abstract_clean = clean_markdown_headings(re.sub(r'(?i)^abstract[:\s]*', '', str(abstract_anchor)).strip())
491
- trans_abstract_clean = clean_markdown_headings(re.sub(r'(?i)^(摘要|abstract|аннотация|түйіндеме)[:\s]*', '', agent.call_deepseek(f"Translate into {target_lang}. Output ONLY translated text.", abstract_anchor, max_tokens=1500)).strip())
492
 
493
  loc_abs = {"Simplified Chinese (简体中文)": "摘要", "Russian (Русский)": "Аннотация", "Kazakh (Қазақша)": "Түйіндеме"}.get(target_lang, "Abstract")
494
  loc_kw = {"Simplified Chinese (简体中文)": "关键词", "Russian (Русский)": "Ключевые слова", "Kazakh (Қазақша)": "Кілт сөздер"}.get(target_lang, "Keywords")
 
488
  structure = [sec for sec in plan.get("structure", []) if sec.get("section", "").strip().lower() not in META_SECTIONS_BLACKLIST]
489
 
490
  en_abstract_clean = clean_markdown_headings(re.sub(r'(?i)^abstract[:\s]*', '', str(abstract_anchor)).strip())
491
+ trans_abstract_clean = clean_markdown_headings(re.sub(r'(?i)^(摘要|abstract|аннотация|түйіндеме)[:\s]*', '', agent.call_deepseek(f"Translate into {target_lang}. Output ONLY translated text.", abstract_anchor, max_tokens=3000)).strip())
492
 
493
  loc_abs = {"Simplified Chinese (简体中文)": "摘要", "Russian (Русский)": "Аннотация", "Kazakh (Қазақша)": "Түйіндеме"}.get(target_lang, "Abstract")
494
  loc_kw = {"Simplified Chinese (简体中文)": "关键词", "Russian (Русский)": "Ключевые слова", "Kazakh (Қазақша)": "Кілт сөздер"}.get(target_lang, "Keywords")