Spaces:
Sleeping
Sleeping
Commit
·
5f8859a
1
Parent(s):
cfe8e1a
making explanation editable
Browse files
pages/training_adherence.py
CHANGED
@@ -16,7 +16,6 @@ memory = st.session_state['memory']
|
|
16 |
@st.cache_data(show_spinner="Retrieving responses from the server ...")
|
17 |
def get_ta_responses():
|
18 |
data = defaultdict(defaultdict)
|
19 |
-
# with st.spinner("Retrieving responses from the server ...")
|
20 |
for question in QUESTION2PHASE.keys():
|
21 |
# responses = ["Yes, The helper showed some respect.",
|
22 |
# "Yes. The helper is good! No doubt",
|
@@ -55,7 +54,10 @@ with tab1:
|
|
55 |
key=f"{question}_manual"
|
56 |
)
|
57 |
if expl:
|
58 |
-
st.
|
|
|
|
|
|
|
59 |
|
60 |
with st.container():
|
61 |
col1, col2 = st.columns(2)
|
@@ -65,7 +67,8 @@ with tab1:
|
|
65 |
if col2.button("Submit Scoring", type="primary"):
|
66 |
ytrue = {
|
67 |
question: {
|
68 |
-
"response":st.session_state[f"{question}_manual"]
|
|
|
69 |
}
|
70 |
for question in QUESTION2PHASE.keys()
|
71 |
}
|
|
|
16 |
@st.cache_data(show_spinner="Retrieving responses from the server ...")
|
17 |
def get_ta_responses():
|
18 |
data = defaultdict(defaultdict)
|
|
|
19 |
for question in QUESTION2PHASE.keys():
|
20 |
# responses = ["Yes, The helper showed some respect.",
|
21 |
# "Yes. The helper is good! No doubt",
|
|
|
54 |
key=f"{question}_manual"
|
55 |
)
|
56 |
if expl:
|
57 |
+
st.text_area(
|
58 |
+
label="", value=data[question]["explanation"], key=f"{question}_explanation_manual"
|
59 |
+
)
|
60 |
+
# st.write(data[question]["explanation"])
|
61 |
|
62 |
with st.container():
|
63 |
col1, col2 = st.columns(2)
|
|
|
67 |
if col2.button("Submit Scoring", type="primary"):
|
68 |
ytrue = {
|
69 |
question: {
|
70 |
+
"response": st.session_state[f"{question}_manual"],
|
71 |
+
"explanation": st.session_state[f"{question}_explanation_manual"] if expl else "",
|
72 |
}
|
73 |
for question in QUESTION2PHASE.keys()
|
74 |
}
|