Spaces:
Running
Running
Update gen_dag.py
Browse files- gen_dag.py +3 -4
gen_dag.py
CHANGED
|
@@ -24,7 +24,7 @@ def load_config():
|
|
| 24 |
"api_keys": {
|
| 25 |
"gemini_api_key": api_key
|
| 26 |
},
|
| 27 |
-
"api_base_url": api_base_url
|
| 28 |
}
|
| 29 |
|
| 30 |
if api_key:
|
|
@@ -93,9 +93,9 @@ def main():
|
|
| 93 |
continue # 只处理存在 auto 文件夹的目录
|
| 94 |
|
| 95 |
# ✅ 如果 success.txt 已存在,跳过该目录
|
| 96 |
-
success_flag = os.path.join(auto_path, "
|
| 97 |
if os.path.isfile(success_flag):
|
| 98 |
-
print(f"✅
|
| 99 |
continue
|
| 100 |
|
| 101 |
print(f"\n🚀 Processing paper folder: {auto_path}")
|
|
@@ -122,7 +122,6 @@ def main():
|
|
| 122 |
graph_json_path = os.path.join(auto_path, "graph.json")
|
| 123 |
|
| 124 |
# === 清理 markdown === 去除无意义的段落,如relative work,reference,appendix等等
|
| 125 |
-
print(config)
|
| 126 |
print("🧹 Cleaning markdown before splitting...")
|
| 127 |
cleaned_md_path = clean_paper(md_path, clean_prompt, model="gemini-3-pro-preview", config=config)
|
| 128 |
|
|
|
|
| 24 |
"api_keys": {
|
| 25 |
"gemini_api_key": api_key
|
| 26 |
},
|
| 27 |
+
"api_base_url": api_base_url
|
| 28 |
}
|
| 29 |
|
| 30 |
if api_key:
|
|
|
|
| 93 |
continue # 只处理存在 auto 文件夹的目录
|
| 94 |
|
| 95 |
# ✅ 如果 success.txt 已存在,跳过该目录
|
| 96 |
+
success_flag = os.path.join(auto_path, "success_dag.txt")
|
| 97 |
if os.path.isfile(success_flag):
|
| 98 |
+
print(f"✅ success_dag.txt exists in {auto_path}, skipping...")
|
| 99 |
continue
|
| 100 |
|
| 101 |
print(f"\n🚀 Processing paper folder: {auto_path}")
|
|
|
|
| 122 |
graph_json_path = os.path.join(auto_path, "graph.json")
|
| 123 |
|
| 124 |
# === 清理 markdown === 去除无意义的段落,如relative work,reference,appendix等等
|
|
|
|
| 125 |
print("🧹 Cleaning markdown before splitting...")
|
| 126 |
cleaned_md_path = clean_paper(md_path, clean_prompt, model="gemini-3-pro-preview", config=config)
|
| 127 |
|