8bitnand
initial commit - basic chat model UI
ca9a177
raw
history blame
708 Bytes
import streamlit as st
st.title("LLM powred Google search")
if "messages" not in st.session_state:
st.session_state.messages = []
for message in st.session_state.messages:
with st.chat_message(message["role"]):
st.markdown(message["content"])
if prompt := st.chat_input("Search Here insetad of Google"):
st.chat_message("user").markdown(prompt)
st.session_state.messages.append({"role": "user", "content": prompt})
response = (
f"Ans - {prompt}" # TODO add answer to the prompt by calling the answer method
)
with st.chat_message("assistant"):
st.markdown(response)
st.session_state.messages.append({"role": "assistant", "content": response})