Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,22 +104,11 @@ def extract_project_names_from_rag_manual_mix(query: str, db_jb, db_sim, top_k:
|
|
| 104 |
return list(OrderedDict.fromkeys(combined_names))[:top_k]
|
| 105 |
|
| 106 |
def load_data(file_path: str = EXCEL_FILE_PATH) -> pd.DataFrame:
|
| 107 |
-
# global _df_cache
|
| 108 |
-
# if _df_cache is not None:
|
| 109 |
-
# return _df_cache
|
| 110 |
-
# try:
|
| 111 |
-
# print(f"讀取Excel檔案中... ({file_path})")
|
| 112 |
-
# _df_cache = pd.read_excel(file_path)
|
| 113 |
-
# print("✅ Excel 資料載入成功。")
|
| 114 |
-
# return _df_cache
|
| 115 |
-
# except FileNotFoundError:
|
| 116 |
-
# print(f"❌ 錯誤:找不到檔案 {file_path}")
|
| 117 |
-
# return None
|
| 118 |
global _df_cache
|
| 119 |
if _df_cache is not None:
|
| 120 |
return _df_cache
|
| 121 |
|
| 122 |
-
if not
|
| 123 |
print("❌ 錯誤:未提供 Excel 密碼。")
|
| 124 |
return None
|
| 125 |
|
|
|
|
| 104 |
return list(OrderedDict.fromkeys(combined_names))[:top_k]
|
| 105 |
|
| 106 |
def load_data(file_path: str = EXCEL_FILE_PATH) -> pd.DataFrame:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
global _df_cache
|
| 108 |
if _df_cache is not None:
|
| 109 |
return _df_cache
|
| 110 |
|
| 111 |
+
if not EXCEL_PASSWORD:
|
| 112 |
print("❌ 錯誤:未提供 Excel 密碼。")
|
| 113 |
return None
|
| 114 |
|