Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,12 +275,8 @@ def log_event(data: Dict):
|
|
| 275 |
"question": data.get("question"),
|
| 276 |
"student_id": data.get("student_id"),
|
| 277 |
}
|
| 278 |
-
# ✅
|
| 279 |
-
metadata = {
|
| 280 |
-
k: v
|
| 281 |
-
for k, v in data.items()
|
| 282 |
-
if k not in ("question", "answer")
|
| 283 |
-
}
|
| 284 |
|
| 285 |
ls_client.create_example(
|
| 286 |
inputs=inputs,
|
|
@@ -390,6 +386,9 @@ with gr.Blocks(
|
|
| 390 |
user_name_state = gr.State("")
|
| 391 |
user_id_state = gr.State("")
|
| 392 |
|
|
|
|
|
|
|
|
|
|
| 393 |
# --- Header ---
|
| 394 |
with gr.Row(elem_classes="header-container"):
|
| 395 |
with gr.Column(scale=3):
|
|
@@ -684,6 +683,7 @@ with gr.Blocks(
|
|
| 684 |
),
|
| 685 |
user_name_state: gr.update(),
|
| 686 |
user_id_state: gr.update(),
|
|
|
|
| 687 |
user_input: gr.update(interactive=False),
|
| 688 |
clear_btn: gr.update(interactive=False),
|
| 689 |
export_btn: gr.update(interactive=False),
|
|
@@ -696,8 +696,8 @@ with gr.Blocks(
|
|
| 696 |
learning_mode: gr.update(interactive=False),
|
| 697 |
model_name: gr.update(interactive=False),
|
| 698 |
docs_btn: gr.update(interactive=False),
|
| 699 |
-
thumb_up_btn: gr.update(interactive=False),
|
| 700 |
-
thumb_down_btn: gr.update(interactive=False),
|
| 701 |
feedback_toggle_btn: gr.update(interactive=False),
|
| 702 |
feedback_text: gr.update(visible=False, value=""),
|
| 703 |
feedback_submit_btn: gr.update(interactive=False, visible=False),
|
|
@@ -716,6 +716,7 @@ with gr.Blocks(
|
|
| 716 |
student_info_html: gr.update(value=info_html),
|
| 717 |
user_name_state: name,
|
| 718 |
user_id_state: id_val,
|
|
|
|
| 719 |
user_input: gr.update(
|
| 720 |
interactive=True,
|
| 721 |
placeholder="Ask about Module 10 concepts, Responsible AI, or let Clare test you...",
|
|
@@ -731,8 +732,9 @@ with gr.Blocks(
|
|
| 731 |
learning_mode: gr.update(interactive=True),
|
| 732 |
model_name: gr.update(interactive=False),
|
| 733 |
docs_btn: gr.update(interactive=True),
|
| 734 |
-
|
| 735 |
-
|
|
|
|
| 736 |
feedback_toggle_btn: gr.update(interactive=True),
|
| 737 |
feedback_text: gr.update(visible=False, value=""),
|
| 738 |
feedback_submit_btn: gr.update(interactive=True, visible=False),
|
|
@@ -748,6 +750,7 @@ with gr.Blocks(
|
|
| 748 |
student_info_html,
|
| 749 |
user_name_state,
|
| 750 |
user_id_state,
|
|
|
|
| 751 |
user_input,
|
| 752 |
clear_btn,
|
| 753 |
export_btn,
|
|
@@ -777,6 +780,7 @@ with gr.Blocks(
|
|
| 777 |
id_input: gr.update(value=""),
|
| 778 |
user_name_state: "",
|
| 779 |
user_id_state: "",
|
|
|
|
| 780 |
student_info_html: gr.update(value=""),
|
| 781 |
user_input: gr.update(
|
| 782 |
value="",
|
|
@@ -793,8 +797,8 @@ with gr.Blocks(
|
|
| 793 |
language_preference: gr.update(interactive=False),
|
| 794 |
learning_mode: gr.update(interactive=False),
|
| 795 |
docs_btn: gr.update(interactive=False),
|
| 796 |
-
thumb_up_btn: gr.update(interactive=False),
|
| 797 |
-
thumb_down_btn: gr.update(interactive=False),
|
| 798 |
feedback_toggle_btn: gr.update(interactive=False),
|
| 799 |
feedback_text: gr.update(visible=False, value=""),
|
| 800 |
feedback_submit_btn: gr.update(interactive=False, visible=False),
|
|
@@ -810,6 +814,7 @@ with gr.Blocks(
|
|
| 810 |
id_input,
|
| 811 |
user_name_state,
|
| 812 |
user_id_state,
|
|
|
|
| 813 |
student_info_html,
|
| 814 |
user_input,
|
| 815 |
clear_btn,
|
|
@@ -888,7 +893,9 @@ with gr.Blocks(
|
|
| 888 |
mode_val,
|
| 889 |
doc_type_val,
|
| 890 |
user_id_val,
|
|
|
|
| 891 |
):
|
|
|
|
| 892 |
if not user_id_val:
|
| 893 |
out_msg = (
|
| 894 |
"🔒 Please log in with your Student Name and Email/ID on the right "
|
|
@@ -900,17 +907,40 @@ with gr.Blocks(
|
|
| 900 |
weaknesses or [],
|
| 901 |
cognitive_state or {"confusion": 0, "mastery": 0},
|
| 902 |
)
|
| 903 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 904 |
|
| 905 |
resolved_lang = detect_language(message or "", lang_pref)
|
| 906 |
|
|
|
|
| 907 |
if not message or not message.strip():
|
| 908 |
new_status = render_session_status(
|
| 909 |
mode_val or "Concept Explainer",
|
| 910 |
weaknesses or [],
|
| 911 |
cognitive_state or {"confusion": 0, "mastery": 0},
|
| 912 |
)
|
| 913 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 914 |
|
| 915 |
weaknesses = update_weaknesses_from_message(message, weaknesses or [])
|
| 916 |
cognitive_state = update_cognitive_state_from_message(message, cognitive_state)
|
|
@@ -972,7 +1002,19 @@ with gr.Blocks(
|
|
| 972 |
|
| 973 |
new_status = render_session_status(mode_val, weaknesses, cognitive_state)
|
| 974 |
|
| 975 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 976 |
|
| 977 |
user_input.submit(
|
| 978 |
respond,
|
|
@@ -988,6 +1030,7 @@ with gr.Blocks(
|
|
| 988 |
learning_mode,
|
| 989 |
doc_type,
|
| 990 |
user_id_state,
|
|
|
|
| 991 |
],
|
| 992 |
[
|
| 993 |
user_input,
|
|
@@ -997,6 +1040,9 @@ with gr.Blocks(
|
|
| 997 |
session_status,
|
| 998 |
last_question_state,
|
| 999 |
last_answer_state,
|
|
|
|
|
|
|
|
|
|
| 1000 |
],
|
| 1001 |
)
|
| 1002 |
|
|
@@ -1129,10 +1175,33 @@ with gr.Blocks(
|
|
| 1129 |
[feedback_text, feedback_submit_btn],
|
| 1130 |
)
|
| 1131 |
|
| 1132 |
-
def send_thumb_up(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1133 |
if not last_q and not last_a:
|
| 1134 |
print("No last QA to log for thumbs_up.")
|
| 1135 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1136 |
try:
|
| 1137 |
log_event(
|
| 1138 |
{
|
|
@@ -1151,10 +1220,38 @@ with gr.Blocks(
|
|
| 1151 |
except Exception as e:
|
| 1152 |
print("thumb_up log error:", e)
|
| 1153 |
|
| 1154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1155 |
if not last_q and not last_a:
|
| 1156 |
print("No last QA to log for thumbs_down.")
|
| 1157 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1158 |
try:
|
| 1159 |
log_event(
|
| 1160 |
{
|
|
@@ -1173,6 +1270,12 @@ with gr.Blocks(
|
|
| 1173 |
except Exception as e:
|
| 1174 |
print("thumb_down log error:", e)
|
| 1175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1176 |
thumb_up_btn.click(
|
| 1177 |
send_thumb_up,
|
| 1178 |
[
|
|
@@ -1182,8 +1285,9 @@ with gr.Blocks(
|
|
| 1182 |
learning_mode,
|
| 1183 |
model_name,
|
| 1184 |
language_preference,
|
|
|
|
| 1185 |
],
|
| 1186 |
-
[],
|
| 1187 |
)
|
| 1188 |
|
| 1189 |
thumb_down_btn.click(
|
|
@@ -1195,8 +1299,9 @@ with gr.Blocks(
|
|
| 1195 |
learning_mode,
|
| 1196 |
model_name,
|
| 1197 |
language_preference,
|
|
|
|
| 1198 |
],
|
| 1199 |
-
[],
|
| 1200 |
)
|
| 1201 |
|
| 1202 |
def submit_detailed_feedback(
|
|
@@ -1272,7 +1377,19 @@ with gr.Blocks(
|
|
| 1272 |
def clear_all():
|
| 1273 |
empty_state = {"confusion": 0, "mastery": 0}
|
| 1274 |
default_status = render_session_status("Concept Explainer", [], empty_state)
|
| 1275 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1276 |
|
| 1277 |
clear_btn.click(
|
| 1278 |
clear_all,
|
|
@@ -1286,6 +1403,9 @@ with gr.Blocks(
|
|
| 1286 |
session_status,
|
| 1287 |
last_question_state,
|
| 1288 |
last_answer_state,
|
|
|
|
|
|
|
|
|
|
| 1289 |
],
|
| 1290 |
queue=False,
|
| 1291 |
)
|
|
|
|
| 275 |
"question": data.get("question"),
|
| 276 |
"student_id": data.get("student_id"),
|
| 277 |
}
|
| 278 |
+
# ✅ event_type 等字段作为 metadata,这样在 Dataset 列表里能直接看到 / 过滤
|
| 279 |
+
metadata = {k: v for k, v in data.items() if k not in ("question", "answer")}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
ls_client.create_example(
|
| 282 |
inputs=inputs,
|
|
|
|
| 386 |
user_name_state = gr.State("")
|
| 387 |
user_id_state = gr.State("")
|
| 388 |
|
| 389 |
+
# ✅ 当前“最近一次回答”是否已经被点赞/点踩(只允许一次)
|
| 390 |
+
feedback_used_state = gr.State(False)
|
| 391 |
+
|
| 392 |
# --- Header ---
|
| 393 |
with gr.Row(elem_classes="header-container"):
|
| 394 |
with gr.Column(scale=3):
|
|
|
|
| 683 |
),
|
| 684 |
user_name_state: gr.update(),
|
| 685 |
user_id_state: gr.update(),
|
| 686 |
+
feedback_used_state: False,
|
| 687 |
user_input: gr.update(interactive=False),
|
| 688 |
clear_btn: gr.update(interactive=False),
|
| 689 |
export_btn: gr.update(interactive=False),
|
|
|
|
| 696 |
learning_mode: gr.update(interactive=False),
|
| 697 |
model_name: gr.update(interactive=False),
|
| 698 |
docs_btn: gr.update(interactive=False),
|
| 699 |
+
thumb_up_btn: gr.update(interactive=False, value="👍 Helpful"),
|
| 700 |
+
thumb_down_btn: gr.update(interactive=False, value="👎 Not helpful"),
|
| 701 |
feedback_toggle_btn: gr.update(interactive=False),
|
| 702 |
feedback_text: gr.update(visible=False, value=""),
|
| 703 |
feedback_submit_btn: gr.update(interactive=False, visible=False),
|
|
|
|
| 716 |
student_info_html: gr.update(value=info_html),
|
| 717 |
user_name_state: name,
|
| 718 |
user_id_state: id_val,
|
| 719 |
+
feedback_used_state: False,
|
| 720 |
user_input: gr.update(
|
| 721 |
interactive=True,
|
| 722 |
placeholder="Ask about Module 10 concepts, Responsible AI, or let Clare test you...",
|
|
|
|
| 732 |
learning_mode: gr.update(interactive=True),
|
| 733 |
model_name: gr.update(interactive=False),
|
| 734 |
docs_btn: gr.update(interactive=True),
|
| 735 |
+
# ✅ 登录后仍然不允许点赞点踩,必须“有回答”才解锁
|
| 736 |
+
thumb_up_btn: gr.update(interactive=False, value="👍 Helpful"),
|
| 737 |
+
thumb_down_btn: gr.update(interactive=False, value="👎 Not helpful"),
|
| 738 |
feedback_toggle_btn: gr.update(interactive=True),
|
| 739 |
feedback_text: gr.update(visible=False, value=""),
|
| 740 |
feedback_submit_btn: gr.update(interactive=True, visible=False),
|
|
|
|
| 750 |
student_info_html,
|
| 751 |
user_name_state,
|
| 752 |
user_id_state,
|
| 753 |
+
feedback_used_state,
|
| 754 |
user_input,
|
| 755 |
clear_btn,
|
| 756 |
export_btn,
|
|
|
|
| 780 |
id_input: gr.update(value=""),
|
| 781 |
user_name_state: "",
|
| 782 |
user_id_state: "",
|
| 783 |
+
feedback_used_state: False,
|
| 784 |
student_info_html: gr.update(value=""),
|
| 785 |
user_input: gr.update(
|
| 786 |
value="",
|
|
|
|
| 797 |
language_preference: gr.update(interactive=False),
|
| 798 |
learning_mode: gr.update(interactive=False),
|
| 799 |
docs_btn: gr.update(interactive=False),
|
| 800 |
+
thumb_up_btn: gr.update(interactive=False, value="👍 Helpful"),
|
| 801 |
+
thumb_down_btn: gr.update(interactive=False, value="👎 Not helpful"),
|
| 802 |
feedback_toggle_btn: gr.update(interactive=False),
|
| 803 |
feedback_text: gr.update(visible=False, value=""),
|
| 804 |
feedback_submit_btn: gr.update(interactive=False, visible=False),
|
|
|
|
| 814 |
id_input,
|
| 815 |
user_name_state,
|
| 816 |
user_id_state,
|
| 817 |
+
feedback_used_state,
|
| 818 |
student_info_html,
|
| 819 |
user_input,
|
| 820 |
clear_btn,
|
|
|
|
| 893 |
mode_val,
|
| 894 |
doc_type_val,
|
| 895 |
user_id_val,
|
| 896 |
+
feedback_used,
|
| 897 |
):
|
| 898 |
+
# 未登录:不解锁按钮
|
| 899 |
if not user_id_val:
|
| 900 |
out_msg = (
|
| 901 |
"🔒 Please log in with your Student Name and Email/ID on the right "
|
|
|
|
| 907 |
weaknesses or [],
|
| 908 |
cognitive_state or {"confusion": 0, "mastery": 0},
|
| 909 |
)
|
| 910 |
+
return (
|
| 911 |
+
"",
|
| 912 |
+
new_history,
|
| 913 |
+
weaknesses,
|
| 914 |
+
cognitive_state,
|
| 915 |
+
new_status,
|
| 916 |
+
"",
|
| 917 |
+
"",
|
| 918 |
+
feedback_used,
|
| 919 |
+
gr.update(interactive=False, value="👍 Helpful"),
|
| 920 |
+
gr.update(interactive=False, value="👎 Not helpful"),
|
| 921 |
+
)
|
| 922 |
|
| 923 |
resolved_lang = detect_language(message or "", lang_pref)
|
| 924 |
|
| 925 |
+
# 空输入:不改变按钮状态
|
| 926 |
if not message or not message.strip():
|
| 927 |
new_status = render_session_status(
|
| 928 |
mode_val or "Concept Explainer",
|
| 929 |
weaknesses or [],
|
| 930 |
cognitive_state or {"confusion": 0, "mastery": 0},
|
| 931 |
)
|
| 932 |
+
return (
|
| 933 |
+
"",
|
| 934 |
+
chat_history,
|
| 935 |
+
weaknesses,
|
| 936 |
+
cognitive_state,
|
| 937 |
+
new_status,
|
| 938 |
+
"",
|
| 939 |
+
"",
|
| 940 |
+
feedback_used,
|
| 941 |
+
gr.update(),
|
| 942 |
+
gr.update(),
|
| 943 |
+
)
|
| 944 |
|
| 945 |
weaknesses = update_weaknesses_from_message(message, weaknesses or [])
|
| 946 |
cognitive_state = update_cognitive_state_from_message(message, cognitive_state)
|
|
|
|
| 1002 |
|
| 1003 |
new_status = render_session_status(mode_val, weaknesses, cognitive_state)
|
| 1004 |
|
| 1005 |
+
# ✅ 有新回答:重置 feedback_used=False,并解锁按钮(恢复文案)
|
| 1006 |
+
return (
|
| 1007 |
+
"",
|
| 1008 |
+
new_history,
|
| 1009 |
+
weaknesses,
|
| 1010 |
+
cognitive_state,
|
| 1011 |
+
new_status,
|
| 1012 |
+
message,
|
| 1013 |
+
answer,
|
| 1014 |
+
False,
|
| 1015 |
+
gr.update(interactive=True, value="👍 Helpful"),
|
| 1016 |
+
gr.update(interactive=True, value="👎 Not helpful"),
|
| 1017 |
+
)
|
| 1018 |
|
| 1019 |
user_input.submit(
|
| 1020 |
respond,
|
|
|
|
| 1030 |
learning_mode,
|
| 1031 |
doc_type,
|
| 1032 |
user_id_state,
|
| 1033 |
+
feedback_used_state,
|
| 1034 |
],
|
| 1035 |
[
|
| 1036 |
user_input,
|
|
|
|
| 1040 |
session_status,
|
| 1041 |
last_question_state,
|
| 1042 |
last_answer_state,
|
| 1043 |
+
feedback_used_state,
|
| 1044 |
+
thumb_up_btn,
|
| 1045 |
+
thumb_down_btn,
|
| 1046 |
],
|
| 1047 |
)
|
| 1048 |
|
|
|
|
| 1175 |
[feedback_text, feedback_submit_btn],
|
| 1176 |
)
|
| 1177 |
|
| 1178 |
+
def send_thumb_up(
|
| 1179 |
+
last_q,
|
| 1180 |
+
last_a,
|
| 1181 |
+
user_id_val,
|
| 1182 |
+
mode_val,
|
| 1183 |
+
model_name_val,
|
| 1184 |
+
lang_pref,
|
| 1185 |
+
feedback_used,
|
| 1186 |
+
):
|
| 1187 |
+
# 没有可评价回答:保持禁用
|
| 1188 |
if not last_q and not last_a:
|
| 1189 |
print("No last QA to log for thumbs_up.")
|
| 1190 |
+
return (
|
| 1191 |
+
feedback_used,
|
| 1192 |
+
gr.update(interactive=False, value="👍 Helpful"),
|
| 1193 |
+
gr.update(interactive=False, value="👎 Not helpful"),
|
| 1194 |
+
)
|
| 1195 |
+
|
| 1196 |
+
# 已经反馈过:直接禁用
|
| 1197 |
+
if feedback_used:
|
| 1198 |
+
print("Feedback already sent for this answer (thumb_up).")
|
| 1199 |
+
return (
|
| 1200 |
+
feedback_used,
|
| 1201 |
+
gr.update(interactive=False),
|
| 1202 |
+
gr.update(interactive=False),
|
| 1203 |
+
)
|
| 1204 |
+
|
| 1205 |
try:
|
| 1206 |
log_event(
|
| 1207 |
{
|
|
|
|
| 1220 |
except Exception as e:
|
| 1221 |
print("thumb_up log error:", e)
|
| 1222 |
|
| 1223 |
+
# 点完一次:置 True + 按钮置灰 + 文案 sent
|
| 1224 |
+
return (
|
| 1225 |
+
True,
|
| 1226 |
+
gr.update(interactive=False, value="👍 Helpful (sent)"),
|
| 1227 |
+
gr.update(interactive=False),
|
| 1228 |
+
)
|
| 1229 |
+
|
| 1230 |
+
def send_thumb_down(
|
| 1231 |
+
last_q,
|
| 1232 |
+
last_a,
|
| 1233 |
+
user_id_val,
|
| 1234 |
+
mode_val,
|
| 1235 |
+
model_name_val,
|
| 1236 |
+
lang_pref,
|
| 1237 |
+
feedback_used,
|
| 1238 |
+
):
|
| 1239 |
if not last_q and not last_a:
|
| 1240 |
print("No last QA to log for thumbs_down.")
|
| 1241 |
+
return (
|
| 1242 |
+
feedback_used,
|
| 1243 |
+
gr.update(interactive=False, value="👍 Helpful"),
|
| 1244 |
+
gr.update(interactive=False, value="👎 Not helpful"),
|
| 1245 |
+
)
|
| 1246 |
+
|
| 1247 |
+
if feedback_used:
|
| 1248 |
+
print("Feedback already sent for this answer (thumb_down).")
|
| 1249 |
+
return (
|
| 1250 |
+
feedback_used,
|
| 1251 |
+
gr.update(interactive=False),
|
| 1252 |
+
gr.update(interactive=False),
|
| 1253 |
+
)
|
| 1254 |
+
|
| 1255 |
try:
|
| 1256 |
log_event(
|
| 1257 |
{
|
|
|
|
| 1270 |
except Exception as e:
|
| 1271 |
print("thumb_down log error:", e)
|
| 1272 |
|
| 1273 |
+
return (
|
| 1274 |
+
True,
|
| 1275 |
+
gr.update(interactive=False),
|
| 1276 |
+
gr.update(interactive=False, value="👎 Not helpful (sent)"),
|
| 1277 |
+
)
|
| 1278 |
+
|
| 1279 |
thumb_up_btn.click(
|
| 1280 |
send_thumb_up,
|
| 1281 |
[
|
|
|
|
| 1285 |
learning_mode,
|
| 1286 |
model_name,
|
| 1287 |
language_preference,
|
| 1288 |
+
feedback_used_state,
|
| 1289 |
],
|
| 1290 |
+
[feedback_used_state, thumb_up_btn, thumb_down_btn],
|
| 1291 |
)
|
| 1292 |
|
| 1293 |
thumb_down_btn.click(
|
|
|
|
| 1299 |
learning_mode,
|
| 1300 |
model_name,
|
| 1301 |
language_preference,
|
| 1302 |
+
feedback_used_state,
|
| 1303 |
],
|
| 1304 |
+
[feedback_used_state, thumb_up_btn, thumb_down_btn],
|
| 1305 |
)
|
| 1306 |
|
| 1307 |
def submit_detailed_feedback(
|
|
|
|
| 1377 |
def clear_all():
|
| 1378 |
empty_state = {"confusion": 0, "mastery": 0}
|
| 1379 |
default_status = render_session_status("Concept Explainer", [], empty_state)
|
| 1380 |
+
return (
|
| 1381 |
+
[],
|
| 1382 |
+
[],
|
| 1383 |
+
empty_state,
|
| 1384 |
+
[],
|
| 1385 |
+
"",
|
| 1386 |
+
default_status,
|
| 1387 |
+
"",
|
| 1388 |
+
"",
|
| 1389 |
+
False,
|
| 1390 |
+
gr.update(interactive=False, value="👍 Helpful"),
|
| 1391 |
+
gr.update(interactive=False, value="👎 Not helpful"),
|
| 1392 |
+
)
|
| 1393 |
|
| 1394 |
clear_btn.click(
|
| 1395 |
clear_all,
|
|
|
|
| 1403 |
session_status,
|
| 1404 |
last_question_state,
|
| 1405 |
last_answer_state,
|
| 1406 |
+
feedback_used_state,
|
| 1407 |
+
thumb_up_btn,
|
| 1408 |
+
thumb_down_btn,
|
| 1409 |
],
|
| 1410 |
queue=False,
|
| 1411 |
)
|