Download utils.py from umbc-nlp/chat-llm: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/spaces/umbc-nlp/chat-llm/resolve/ebab1a2f081fbee714283b3abf9f1004e99534be/utils.py
- Command line
-
hf download hf://spaces/umbc-nlp/chat-llm@ebab1a2f081fbee714283b3abf9f1004e99534be/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/umbc-nlp/chat-llm/resolve/ebab1a2f081fbee714283b3abf9f1004e99534be/utils.py
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() |