Download utils.py from kjn1009/test0713: direct link, hf CLI and curl.
- Browser
- Download file 276 Bytes
-
https://huggingface.co/spaces/kjn1009/test0713/resolve/main/utils.py
- Command line
-
hf download hf://spaces/kjn1009/test0713/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/kjn1009/test0713/resolve/main/utils.py
276 Bytes
| import streamlit as st | |
| def print_messages(): | |
| # 이전 대화 기록 출력 코드 | |
| if "messages" in st.session_state and len(st.session_state["messages"]) > 0: | |
| for role, message in st.session_state["messages"]: | |
| st.chat_message(role).write(message) | |