Spaces:
Sleeping
Sleeping
Corrected columns naming
Browse files- build_index.py +4 -4
build_index.py
CHANGED
|
@@ -60,10 +60,10 @@ def ensure_chunks():
|
|
| 60 |
print("[index] Columns:", df.columns.tolist())
|
| 61 |
|
| 62 |
ANSWER_COL = _pick_column(df, ["answer","answers","fatwa","fatwa_text","content","text","body","الجواب","الإجابة","المحتوى"])
|
| 63 |
-
QUESTION_COL = _pick_column(df, ["
|
| 64 |
-
TITLE_COL = _pick_column(df, ["
|
| 65 |
-
LINK_COL = _pick_column(df, ["
|
| 66 |
-
CAT_COL = _pick_column(df, ["
|
| 67 |
|
| 68 |
if not ANSWER_COL:
|
| 69 |
_write_status({"phase":"error","msg":"Could not detect answer column"})
|
|
|
|
| 60 |
print("[index] Columns:", df.columns.tolist())
|
| 61 |
|
| 62 |
ANSWER_COL = _pick_column(df, ["answer","answers","fatwa","fatwa_text","content","text","body","الجواب","الإجابة","المحتوى"])
|
| 63 |
+
QUESTION_COL = _pick_column(df, ["questions","question_text","ques","السؤال"])
|
| 64 |
+
TITLE_COL = _pick_column(df, ["titles","العنوان"])
|
| 65 |
+
LINK_COL = _pick_column(df, ["links","url","source","الرابط","المصدر"])
|
| 66 |
+
CAT_COL = _pick_column(df, ["categories","categories","topic","topics","التصنيف","القسم"])
|
| 67 |
|
| 68 |
if not ANSWER_COL:
|
| 69 |
_write_status({"phase":"error","msg":"Could not detect answer column"})
|