Update app.py
#1
by
german354a
- opened
app.py
CHANGED
|
@@ -5,8 +5,8 @@ from langchain.schema import HumanMessage,SystemMessage,AIMessage
|
|
| 5 |
from langchain.chat_models import ChatOpenAI
|
| 6 |
|
| 7 |
## Streamlit UI
|
| 8 |
-
st.set_page_config(page_title="
|
| 9 |
-
st.header("
|
| 10 |
|
| 11 |
from dotenv import load_dotenv
|
| 12 |
load_dotenv()
|
|
@@ -26,13 +26,13 @@ def get_chatmodel_response(question):
|
|
| 26 |
st.session_state['flowmessages'].append(AIMessage(content=answer.content))
|
| 27 |
return answer.content
|
| 28 |
|
| 29 |
-
input=st.text_input("
|
| 30 |
response=get_chatmodel_response(input)
|
| 31 |
-
submit=st.button("
|
| 32 |
|
| 33 |
## If ask button is clicked
|
| 34 |
if submit:
|
| 35 |
-
st.subheader("
|
| 36 |
st.write(response)
|
| 37 |
|
| 38 |
|
|
|
|
| 5 |
from langchain.chat_models import ChatOpenAI
|
| 6 |
|
| 7 |
## Streamlit UI
|
| 8 |
+
st.set_page_config(page_title="APLICACION DE IA CONVERSACIONAL VILLA ELISA")
|
| 9 |
+
st.header("ESCRIBE TU PREGUNTA")
|
| 10 |
|
| 11 |
from dotenv import load_dotenv
|
| 12 |
load_dotenv()
|
|
|
|
| 26 |
st.session_state['flowmessages'].append(AIMessage(content=answer.content))
|
| 27 |
return answer.content
|
| 28 |
|
| 29 |
+
input=st.text_input("ENTRADA: ",key="input")
|
| 30 |
response=get_chatmodel_response(input)
|
| 31 |
+
submit=st.button("INGRESA LA PREGUNTA")
|
| 32 |
|
| 33 |
## If ask button is clicked
|
| 34 |
if submit:
|
| 35 |
+
st.subheader("LA RESPUESTA ES ")
|
| 36 |
st.write(response)
|
| 37 |
|
| 38 |
|