chat-llm / utils.py
dipta007's picture
added chat, langchat
ebab1a2
raw
history blame contribute delete
401 Bytes
import time
import streamlit as st
def clear_uploader():
st.rerun()
def undo():
if len(st.session_state.messages) > 0:
st.query_params.clear()
msg = st.session_state.messages.pop()
time.sleep(0.1)
st.rerun()
def restart():
st.query_params.clear()
st.session_state.messages = []
st.session_state.cost = []
time.sleep(0.2)
clear_uploader()