maargdarshak/app.py

19 lines
435 B
Python
Raw Normal View History

import streamlit as st
import langchain
st.title('Ask maargdarshak')
if 'messages' not in st.session_state:
st.session_state.messages = []
for message in st.session_state.messages:
st.chat_message(message['role']).markdown(message['content'])
2024-10-13 00:12:09 +00:00
prompt = st.chat_input("Ask your question here")
if prompt:
st.chat_message('user').markdown(prompt)
2024-10-13 00:12:09 +00:00
st.session_state.messages.append({'role':'user', 'content':prompt})