Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -642,19 +642,96 @@ with aba_auditoria:
|
|
| 642 |
|
| 643 |
if st.session_state.resultado_auditoria:
|
| 644 |
dados = st.session_state.resultado_auditoria
|
| 645 |
-
|
|
|
|
|
|
|
|
|
|
| 646 |
nota_total = sum([
|
| 647 |
dados.nota_tema_problema,
|
| 648 |
dados.nota_introducao_metodo,
|
| 649 |
dados.nota_estruturacao,
|
| 650 |
dados.nota_formatacao_abnt
|
| 651 |
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 652 |
c1, c2, c3, c4 = st.columns(4)
|
| 653 |
c1.metric("Tema/Problema", f"{dados.nota_tema_problema}/20")
|
| 654 |
c2.metric("Intro/Método", f"{dados.nota_introducao_metodo}/20")
|
| 655 |
c3.metric("Estrutura/Linguagem", f"{dados.nota_estruturacao}/20")
|
| 656 |
c4.metric("Formatação/ABNT", f"{dados.nota_formatacao_abnt}/20")
|
| 657 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 658 |
|
| 659 |
# ABA 2: REVISÃO INTELIGENTE
|
| 660 |
with aba_revisao:
|
|
|
|
| 642 |
|
| 643 |
if st.session_state.resultado_auditoria:
|
| 644 |
dados = st.session_state.resultado_auditoria
|
| 645 |
+
|
| 646 |
+
st.header("🏆 Parecer Oficial da Banca UNIFAGOC")
|
| 647 |
+
|
| 648 |
+
# 1. CÁLCULO DA NOTA COM FEEDBACK VISUAL
|
| 649 |
nota_total = sum([
|
| 650 |
dados.nota_tema_problema,
|
| 651 |
dados.nota_introducao_metodo,
|
| 652 |
dados.nota_estruturacao,
|
| 653 |
dados.nota_formatacao_abnt
|
| 654 |
])
|
| 655 |
+
|
| 656 |
+
# Se a nota for maior ou igual a 56 (70% de 80), fica verde. Se não, vermelho.
|
| 657 |
+
if nota_total >= 56:
|
| 658 |
+
st.success(f"### 🎉 NOTA FINAL ESTIMADA: {nota_total}/80 PONTOS")
|
| 659 |
+
else:
|
| 660 |
+
st.error(f"### ⚠️ NOTA FINAL ESTIMADA: {nota_total}/80 PONTOS (Risco de Reprovação)")
|
| 661 |
+
|
| 662 |
+
st.info(f"**💡 Parecer Geral do Examinador:** {dados.justificativa_notas_banca}")
|
| 663 |
+
|
| 664 |
+
st.divider()
|
| 665 |
+
|
| 666 |
+
# 2. DISTRIBUIÇÃO DAS NOTAS (Métricas)
|
| 667 |
+
st.subheader("📊 Distribuição de Pontos")
|
| 668 |
c1, c2, c3, c4 = st.columns(4)
|
| 669 |
c1.metric("Tema/Problema", f"{dados.nota_tema_problema}/20")
|
| 670 |
c2.metric("Intro/Método", f"{dados.nota_introducao_metodo}/20")
|
| 671 |
c3.metric("Estrutura/Linguagem", f"{dados.nota_estruturacao}/20")
|
| 672 |
c4.metric("Formatação/ABNT", f"{dados.nota_formatacao_abnt}/20")
|
| 673 |
+
|
| 674 |
+
st.divider()
|
| 675 |
+
|
| 676 |
+
# 3. ANÁLISE DE ADERÊNCIA E CONTEÚDO (Verde vs Vermelho)
|
| 677 |
+
st.subheader("🎯 Cruzamento: Projeto vs. TCC")
|
| 678 |
+
|
| 679 |
+
# Barra de progresso visual para a aderência
|
| 680 |
+
st.write(f"**Índice de Fidelidade ao Projeto:** {dados.aderencia_percentual}%")
|
| 681 |
+
st.progress(dados.aderencia_percentual / 100)
|
| 682 |
+
st.write("") # Espaçamento
|
| 683 |
+
|
| 684 |
+
col_a, col_b = st.columns(2)
|
| 685 |
+
|
| 686 |
+
with col_a:
|
| 687 |
+
st.markdown("#### ❓ Resposta ao Problema")
|
| 688 |
+
if dados.tcc_respondeu_ao_problema:
|
| 689 |
+
st.success(f"**✅ TCC Respondeu:** {dados.justificativa_problema}")
|
| 690 |
+
else:
|
| 691 |
+
st.error(f"**❌ Fuga do Problema:** {dados.justificativa_problema}")
|
| 692 |
+
|
| 693 |
+
st.markdown("#### 📋 Cumprimento de Objetivos")
|
| 694 |
+
|
| 695 |
+
# Filtra os objetivos que foram cumpridos subtraindo os não cumpridos
|
| 696 |
+
objetivos_cumpridos = [
|
| 697 |
+
obj for obj in dados.objetivos_especificos_identificados
|
| 698 |
+
if obj not in dados.objetivos_nao_cumpridos_no_tcc
|
| 699 |
+
]
|
| 700 |
+
|
| 701 |
+
# Exibe os Verdes (Cumpridos)
|
| 702 |
+
if objetivos_cumpridos:
|
| 703 |
+
for obj in objetivos_cumpridos:
|
| 704 |
+
st.success(f"✅ **Atingido:** {obj}")
|
| 705 |
+
|
| 706 |
+
# Exibe os Vermelhos (Falhos)
|
| 707 |
+
if dados.objetivos_nao_cumpridos_no_tcc:
|
| 708 |
+
for obj in dados.objetivos_nao_cumpridos_no_tcc:
|
| 709 |
+
st.error(f"❌ **Faltou Abordar:** {obj}")
|
| 710 |
+
elif not dados.objetivos_nao_cumpridos_no_tcc and objetivos_cumpridos:
|
| 711 |
+
st.success("✨ **Perfeito!** Todos os objetivos específicos foram mapeados e cumpridos.")
|
| 712 |
+
|
| 713 |
+
with col_b:
|
| 714 |
+
st.markdown("#### 🚨 Filtro Anti-Embromação e Incoerências")
|
| 715 |
+
|
| 716 |
+
teve_problema_grave = False
|
| 717 |
+
|
| 718 |
+
if dados.incoerencias_internas:
|
| 719 |
+
teve_problema_grave = True
|
| 720 |
+
for incoerencia in dados.incoerencias_internas:
|
| 721 |
+
st.error(f"**Incoerência Estrutural:** {incoerencia}")
|
| 722 |
+
|
| 723 |
+
if dados.desvios_de_tema_ou_linguica:
|
| 724 |
+
teve_problema_grave = True
|
| 725 |
+
for desvio in dados.desvios_de_tema_ou_linguica:
|
| 726 |
+
st.warning(f"**Fuga de Tema / Enrolação:** {desvio}")
|
| 727 |
+
|
| 728 |
+
if dados.indicios_texto_generico_ia:
|
| 729 |
+
teve_problema_grave = True
|
| 730 |
+
for ia in dados.indicios_texto_generico_ia:
|
| 731 |
+
st.error(f"**Indício de Texto Genérico/IA:** {ia}")
|
| 732 |
+
|
| 733 |
+
if not teve_problema_grave:
|
| 734 |
+
st.success("✅ **Excelente!** O texto está fluido, sem contradições internas, sem enrolação (enchimento de linguiça) e com linguagem autêntica.")
|
| 735 |
|
| 736 |
# ABA 2: REVISÃO INTELIGENTE
|
| 737 |
with aba_revisao:
|