Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,17 @@ import os
|
|
| 4 |
from modelo import get_chain
|
| 5 |
st.set_page_config(layout="wide")
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
os.environ["OPENAI_API_KEY"] = st.secrets['OPENAI_API_KEY'] # agregada en la config de hugginface
|
| 8 |
st.markdown("<h1 style='text-align: center; color: yellow;'>Chatbot SII</h1>", unsafe_allow_html=True)
|
| 9 |
st.header("Un ChatBot 🤖🦾 entrenado con preguntas frecuentes del sitio del servicios de impuestos interno de Chile.")
|
|
|
|
| 4 |
from modelo import get_chain
|
| 5 |
st.set_page_config(layout="wide")
|
| 6 |
|
| 7 |
+
# Initialization
|
| 8 |
+
if 'historial' not in st.session_state:
|
| 9 |
+
st.session_state['historial'] = 'Hola soy tu asistente del dia de hoy, en que te puedo ayudar'
|
| 10 |
+
|
| 11 |
+
def get_data():
|
| 12 |
+
return st.session_state["historial"]
|
| 13 |
+
|
| 14 |
+
def add_data(value: str):
|
| 15 |
+
st.session_state["historial"] = value
|
| 16 |
+
|
| 17 |
+
|
| 18 |
os.environ["OPENAI_API_KEY"] = st.secrets['OPENAI_API_KEY'] # agregada en la config de hugginface
|
| 19 |
st.markdown("<h1 style='text-align: center; color: yellow;'>Chatbot SII</h1>", unsafe_allow_html=True)
|
| 20 |
st.header("Un ChatBot 🤖🦾 entrenado con preguntas frecuentes del sitio del servicios de impuestos interno de Chile.")
|