Explorar el Código

fix: 修正输出文件名格式,使用输出目录名称作为文件名

zhch158_admin hace 3 meses
padre
commit
a2fa6202f5
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      zhch/ppstructurev3_single_process.py

+ 2 - 1
zhch/ppstructurev3_single_process.py

@@ -277,7 +277,8 @@ def main():
         }
         
         # 保存最终结果
-        output_file = os.path.join(output_dir, f"OmniDocBench_Single_batch-{args.batch_size}.json")
+        output_file_name = Path(output_dir).name
+        output_file = os.path.join(output_dir, f"{output_file_name}.json")
         final_results = {
             "stats": stats,
             "results": results