def on_submit_redacao()

in Frontend/st_pages/corrigir.py [0:0]


def on_submit_redacao():
    with st.spinner(f'Wating for the model...'):
        x = {
            "tema_redacao": tema_redacao,
            "textos_motivadores": textos_motivadores,
            "redacao_estudante": redacao_aluno,
            "enunciado_redacao": "",
        }

        correcao = corretor.get_correcao_from_redacao(x)
    
    
    st.markdown(f"# Theme: {tema_redacao}")
    st.expander("Support texts:", expanded=False).markdown(textos_motivadores)
    st.expander("Student Essay", expanded=False).markdown(redacao_aluno)

    if type(notasProfessores) != type(None): 
        st.expander("Assessment by Competency Teachers", expanded=False).write(notasProfessores)
    st.markdown("### Assessment by Competency Teachers")

    notas = correcao.get_nota_comptencias().T
    notas.columns = competencias
    st.write(notas)
    st.markdown(correcao.get_comentarios(), unsafe_allow_html=True)
    st.expander("JSON Model Response", expanded=False).write(correcao.get_resposta_completa())