caarleexx commited on
Commit
944ed6b
·
verified ·
1 Parent(s): bcd3e5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -297,7 +297,7 @@ MAPEIE CENÁRIOS ONDE RESPOSTA MUDA - TELEGRÁFICO
297
 
298
  RETORNE JSON:
299
  {{"cenarios": {{"provaveis": [{{"id": "C1", "desc": "cenário-1-comprimido", "contexto-relevante": "X"}}],
300
- "improvaveis": [{{"id": "C2", "desc": "cenário-2-comprimido"}}]},
301
  "total": 2,
302
  "tipo_resposta": "múltipla|unívoca",
303
  "confianca": "alta|média|baixa",
@@ -542,6 +542,7 @@ def chat_interface(msg: str, hist: List, anexo=None, dna_json: str="{}") -> Tupl
542
  print(f"✅ RESPOSTA ENVIADA: {len(resp)} chars")
543
  return novo_hist, "", json.dumps(dna_new, indent=2), None
544
 
 
545
  __name__ == "__main__":
546
  with gr.Blocks(title="Pipeline v10 ATUALIZADA", theme=gr.themes.Soft()) as demo:
547
  gr.Markdown(TITLE + "\n**Metacognição Pura + X1-X2 + Verificação Final**")
@@ -555,8 +556,9 @@ __name__ == "__main__":
555
  file_up = gr.File(label="Anexo", file_types=[".pdf",".png",".jpg"])
556
  btn_go = gr.Button("🚀 v10 ATUALIZADA", variant="primary")
557
 
558
- btn_go.click(chat_interface, [input_txt, chat, file_up, dna_view],
559
  [chat, input_txt, dna_view, file_up])
 
560
  input_txt.submit(chat_interface, [input_txt, chat, file_up, dna_view],
561
  [chat, input_txt, dna_view, file_up])
562
 
 
297
 
298
  RETORNE JSON:
299
  {{"cenarios": {{"provaveis": [{{"id": "C1", "desc": "cenário-1-comprimido", "contexto-relevante": "X"}}],
300
+ "improvaveis": [{{"id": "C2", "desc": "cenário-2-comprimido"}}]}},
301
  "total": 2,
302
  "tipo_resposta": "múltipla|unívoca",
303
  "confianca": "alta|média|baixa",
 
542
  print(f"✅ RESPOSTA ENVIADA: {len(resp)} chars")
543
  return novo_hist, "", json.dumps(dna_new, indent=2), None
544
 
545
+
546
  __name__ == "__main__":
547
  with gr.Blocks(title="Pipeline v10 ATUALIZADA", theme=gr.themes.Soft()) as demo:
548
  gr.Markdown(TITLE + "\n**Metacognição Pura + X1-X2 + Verificação Final**")
 
556
  file_up = gr.File(label="Anexo", file_types=[".pdf",".png",".jpg"])
557
  btn_go = gr.Button("🚀 v10 ATUALIZADA", variant="primary")
558
 
559
+ btn_go.click(chat_interface, [input_txt, chat, file_up, dna_view],
560
  [chat, input_txt, dna_view, file_up])
561
+
562
  input_txt.submit(chat_interface, [input_txt, chat, file_up, dna_view],
563
  [chat, input_txt, dna_view, file_up])
564