Spaces:
Paused
Paused
Update frontend/app.py
Browse files- frontend/app.py +20 -22
frontend/app.py
CHANGED
|
@@ -429,32 +429,29 @@ async def start():
|
|
| 429 |
total_fmt = f"{total:,}".replace(",", ".")
|
| 430 |
cl.user_session.set("backend_info", info)
|
| 431 |
|
| 432 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
msg = cl.Message(
|
| 434 |
content=(
|
| 435 |
-
f"
|
| 436 |
-
f"<img src='https://huggingface.co/spaces/caarleexx/paraAI_CHATBOT/resolve/main/public/logo_dark.png' "
|
| 437 |
-
f"alt='Para.AI Logo' "
|
| 438 |
-
f"style='max-width: 180px; width: auto; height: auto; "
|
| 439 |
-
f"background: transparent !important; "
|
| 440 |
-
f"border: none !important; "
|
| 441 |
-
f"box-shadow: none !important; "
|
| 442 |
-
f"outline: none !important; "
|
| 443 |
-
f"padding: 0 !important; "
|
| 444 |
-
f"margin: 0 !important; "
|
| 445 |
-
f"filter: none !important;'>"
|
| 446 |
-
f"</div>\n\n"
|
| 447 |
-
f"<div style='text-align: center; margin-bottom: 15px;'>"
|
| 448 |
-
f"<h2>⚖️ Assistente Jurídico TJPR</h2>"
|
| 449 |
-
f"</div>\n\n"
|
| 450 |
-
f"**{total_fmt} decisões** · `{main_m}` (reasoning) + `{minion_m}` (minions)\n\n"
|
| 451 |
f"---\n\n"
|
| 452 |
f"**Como funciona:**\n"
|
| 453 |
-
f"1. 🧠 Gera
|
| 454 |
-
f"2. 📡 Pesquisa
|
| 455 |
-
f"3. ⚙️
|
| 456 |
-
f"4. 🗂️
|
| 457 |
-
f"5. 🌐
|
| 458 |
f"Ao final: **PDF com ementas completas** para download. 📄\n\n"
|
| 459 |
f"_Dano moral em atraso de voo · Agravo de instrumento · Responsabilidade civil médica_"
|
| 460 |
)
|
|
@@ -464,6 +461,7 @@ async def start():
|
|
| 464 |
cl.user_session.set("welcome_msg", msg)
|
| 465 |
|
| 466 |
|
|
|
|
| 467 |
@cl.on_message
|
| 468 |
async def main(message: cl.Message):
|
| 469 |
session_id = cl.user_session.get("id") or "default"
|
|
|
|
| 429 |
total_fmt = f"{total:,}".replace(",", ".")
|
| 430 |
cl.user_session.set("backend_info", info)
|
| 431 |
|
| 432 |
+
# Criar elemento de imagem com fundo transparente
|
| 433 |
+
image = cl.Image(
|
| 434 |
+
path="https://huggingface.co/spaces/caarleexx/paraAI_CHATBOT/resolve/main/public/logo_dark.png",
|
| 435 |
+
name="Para.AI Logo",
|
| 436 |
+
display="inline",
|
| 437 |
+
size="large"
|
| 438 |
+
)
|
| 439 |
+
|
| 440 |
+
# Primeiro envia só a imagem
|
| 441 |
+
logo_msg = cl.Message(content="", elements=[image])
|
| 442 |
+
await logo_msg.send()
|
| 443 |
+
|
| 444 |
+
# Depois envia o texto
|
| 445 |
msg = cl.Message(
|
| 446 |
content=(
|
| 447 |
+
f"**Documentos disponíveis: {total_fmt} decisões**\n\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
f"---\n\n"
|
| 449 |
f"**Como funciona:**\n"
|
| 450 |
+
f"1. 🧠 IA Gera estratégias de busca \n"
|
| 451 |
+
f"2. 📡 Pesquisa na base TJPR \n"
|
| 452 |
+
f"3. ⚙️ Classificam relevância \n"
|
| 453 |
+
f"4. 🗂️ Organiza o tema \n"
|
| 454 |
+
f"5. 🌐 Gera síntese 100% fundamento!!!\n\n"
|
| 455 |
f"Ao final: **PDF com ementas completas** para download. 📄\n\n"
|
| 456 |
f"_Dano moral em atraso de voo · Agravo de instrumento · Responsabilidade civil médica_"
|
| 457 |
)
|
|
|
|
| 461 |
cl.user_session.set("welcome_msg", msg)
|
| 462 |
|
| 463 |
|
| 464 |
+
|
| 465 |
@cl.on_message
|
| 466 |
async def main(message: cl.Message):
|
| 467 |
session_id = cl.user_session.get("id") or "default"
|