Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|