GabrielGD commited on
Commit
a89d9fe
·
verified ·
1 Parent(s): 9d5dc7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -273,7 +273,17 @@ def corrigir_peticao(caso, peticao_texto=None, peticao_arquivo=None, modo_treina
273
  CORRECAO_CACHE[cache_key] = analise_formatada
274
  return aviso_validacao + analise_formatada
275
 
276
- # Outras funções (formatar_correcao, extrair_peticao_corrigida, etc.) permanecem iguais, omitidas por brevidade
 
 
 
 
 
 
 
 
 
 
277
 
278
  def interface_gradio():
279
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
 
273
  CORRECAO_CACHE[cache_key] = analise_formatada
274
  return aviso_validacao + analise_formatada
275
 
276
+ def fornecer_dica_contextual(peticao_texto):
277
+ # Example implementation of contextual tips
278
+ # This function should return a string or any other type that can be displayed in the dica_contextual output
279
+ if "EXCELENTÍSSIMO" not in peticao_texto.upper():
280
+ return "Dica: Verifique o endereçamento da petição."
281
+ elif "juntada da guia de custas" not in peticao_texto.lower():
282
+ return "Dica: Não se esqueça de incluir o pedido de juntada da guia de custas."
283
+ elif "Nestes termos, pede deferimento" in peticao_texto:
284
+ return "Dica: Corrija a vírgula em 'Nestes termos pede deferimento'."
285
+ else:
286
+ return "Dica: Revise a estrutura geral da petição."
287
 
288
  def interface_gradio():
289
  with gr.Blocks(theme=gr.themes.Soft()) as demo: