File size: 617 Bytes
d76b078 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import streamlit as st
from model import rag_chain
st.set_page_config(page_title="Chatbot Legal 🇪🇨", page_icon="⚖️")
st.title("🤖 Chatbot sobre el Código Penal de Ecuador ⚖️")
st.write("Este agente conversacional responde preguntas sobre las leyes del Código Penal ecuatoriano.")
user_input = st.text_input("✍️ Escribe tu pregunta:")
if st.button("🔎 Consultar"):
if user_input:
response = rag_chain.invoke({"query": user_input})
st.write("### 📜 Respuesta:")
st.write(response)
else:
st.warning("⚠️ Escribe una pregunta antes de consultar.")
|