Spaces:
Sleeping
Sleeping
lingyit1108
commited on
Commit
•
354a5a9
1
Parent(s):
6ba18f0
fix qna_answer integer issue
Browse files- qna_prompting.py +4 -1
qna_prompting.py
CHANGED
@@ -114,8 +114,11 @@ def evaluate_qna_answer(user_selected_answer: str) -> str:
|
|
114 |
question_id = st.session_state.question_id
|
115 |
qna_answer = st.session_state.qna_answer
|
116 |
reasons = st.session_state.reasons
|
|
|
|
|
|
|
117 |
|
118 |
-
qna_answer_alphabet = num_mapping.get(
|
119 |
|
120 |
con = sqlite3.connect(db_path)
|
121 |
cur = con.cursor()
|
|
|
114 |
question_id = st.session_state.question_id
|
115 |
qna_answer = st.session_state.qna_answer
|
116 |
reasons = st.session_state.reasons
|
117 |
+
|
118 |
+
### convert to numeric type
|
119 |
+
qna_answer = int(qna_answer)
|
120 |
|
121 |
+
qna_answer_alphabet = num_mapping.get(qna_answer, "ERROR")
|
122 |
|
123 |
con = sqlite3.connect(db_path)
|
124 |
cur = con.cursor()
|