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() |