Spaces:
Build error
Build error
change title
Browse files
app.py
CHANGED
|
@@ -24,6 +24,10 @@ st.set_page_config(initial_sidebar_state="collapsed")
|
|
| 24 |
with st.sidebar.expander("⚙️ 設定", expanded=False):
|
| 25 |
threshold_q = st.slider("質問の類似度しきい値", 0.0, 1.0, 0.7, 0.01)
|
| 26 |
threshold_a = st.slider("回答の類似度しきい値", 0.0, 1.0, 0.65, 0.01)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
def search_answer(user_input):
|
|
@@ -61,7 +65,7 @@ def stream_response(response):
|
|
| 61 |
|
| 62 |
|
| 63 |
# Streamlitチャットインターフェース
|
| 64 |
-
st.title("🤖
|
| 65 |
|
| 66 |
if "messages" not in st.session_state:
|
| 67 |
st.session_state.messages = []
|
|
|
|
| 24 |
with st.sidebar.expander("⚙️ 設定", expanded=False):
|
| 25 |
threshold_q = st.slider("質問の類似度しきい値", 0.0, 1.0, 0.7, 0.01)
|
| 26 |
threshold_a = st.slider("回答の類似度しきい値", 0.0, 1.0, 0.65, 0.01)
|
| 27 |
+
|
| 28 |
+
if st.button("新しいチャット", use_container_width=True):
|
| 29 |
+
st.session_state.messages = []
|
| 30 |
+
st.rerun()
|
| 31 |
|
| 32 |
|
| 33 |
def search_answer(user_input):
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
# Streamlitチャットインターフェース
|
| 68 |
+
st.title("🤖 よくある質問チャットボット")
|
| 69 |
|
| 70 |
if "messages" not in st.session_state:
|
| 71 |
st.session_state.messages = []
|