Truong-Phuc Nguyen commited on
Commit
0d3ec2f
·
verified ·
1 Parent(s): e7bac85

Update AlphaEdu.py

Browse files
Files changed (1) hide show
  1. AlphaEdu.py +2 -2
AlphaEdu.py CHANGED
@@ -84,7 +84,7 @@ paragraph_idx = col_5.selectbox(label='Select your lesson:', options=list(np.ara
84
 
85
  col_11, col_21 = st.columns(spec=[9, 1])
86
  col_11.markdown("<h8 style='text-align: left; font-weight: normal'>Paragraph related:</h8>", unsafe_allow_html=True)
87
- col_11.text_area(label='Paragraph related', label_visibility='collapsed', height=300, value=context_values[paragraph_idx - 1])
88
 
89
  col_21.markdown("<h8 style='text-align: left; font-weight: normal'>QAG modes:</h8>", unsafe_allow_html=True)
90
  col_21.selectbox(label='QAG model:', options=['ViT5-ViNewsQA'], label_visibility='collapsed')
@@ -96,7 +96,7 @@ btn_generate = col_21.button(label='Generate questions', use_container_width=Tru
96
 
97
  if btn_generate == True:
98
  with st.spinner(text='Generating QA pairs from the selected context. Please wait ...'):
99
- st.session_state.output = generateQA(context=context_values)
100
 
101
  if btn_show_answer:
102
  if st.session_state.output != '':
 
84
 
85
  col_11, col_21 = st.columns(spec=[9, 1])
86
  col_11.markdown("<h8 style='text-align: left; font-weight: normal'>Paragraph related:</h8>", unsafe_allow_html=True)
87
+ paragraph = col_11.text_area(label='Paragraph related', label_visibility='collapsed', height=300, value=context_values[paragraph_idx - 1])
88
 
89
  col_21.markdown("<h8 style='text-align: left; font-weight: normal'>QAG modes:</h8>", unsafe_allow_html=True)
90
  col_21.selectbox(label='QAG model:', options=['ViT5-ViNewsQA'], label_visibility='collapsed')
 
96
 
97
  if btn_generate == True:
98
  with st.spinner(text='Generating QA pairs from the selected context. Please wait ...'):
99
+ st.session_state.output = generateQA(context=paragraph)
100
 
101
  if btn_show_answer:
102
  if st.session_state.output != '':