import os import sys from pathlib import Path # 添加当前目录到Python路径 sys.path.append(str(Path(__file__).parent)) # 导入需要的模块 from predict_with_excel import load_all_models, model_list # 测试模型加载 print("[TEST] Starting model loading test...") print(f"[TEST] Current working directory: {os.getcwd()}") # 加载模型 load_all_models() # 显示加载的模型信息 print(f"[TEST] Total models loaded: {len(model_list)}") if model_list: print("[TEST] Loaded models:") for model in model_list: print(f" - {model['name']}") else: print("[TEST] No models were loaded!") # 检查EV17.5相关的模型 ev175_models = [model for model in model_list if 'EV17.5' in model['name']] print(f"[TEST] EV17.5 models found: {len(ev175_models)}") if ev175_models: for model in ev175_models: print(f" - {model['name']}") else: print("[TEST] No EV17.5 models found!")