Spaces:
Sleeping
Sleeping
Zekun Wu
commited on
Commit
•
bcb54f4
1
Parent(s):
727d404
add
Browse files
app.py
CHANGED
@@ -350,12 +350,12 @@ def sidebar_components():
|
|
350 |
|
351 |
if st.sidebar.button('Submit'):
|
352 |
if user_input:
|
353 |
-
st.session_state['coach_query'] = user_input
|
354 |
if st.session_state['chat_context'] == "profile":
|
355 |
chat_prompt_template = create_chat_prompt_template(get_profile_str(st.session_state['profile']),st.session_state['definition'])
|
356 |
else:
|
357 |
chat_prompt_template = create_chat_prompt_template(st.session_state['analysis'],st.session_state['definition'])
|
358 |
-
st.session_state['coach_response'] = execute_query(index, chat_prompt_template, user_input)
|
359 |
st.sidebar.markdown(st.session_state['coach_response'])
|
360 |
|
361 |
|
|
|
350 |
|
351 |
if st.sidebar.button('Submit'):
|
352 |
if user_input:
|
353 |
+
st.session_state['coach_query'] = str(user_input)
|
354 |
if st.session_state['chat_context'] == "profile":
|
355 |
chat_prompt_template = create_chat_prompt_template(get_profile_str(st.session_state['profile']),st.session_state['definition'])
|
356 |
else:
|
357 |
chat_prompt_template = create_chat_prompt_template(st.session_state['analysis'],st.session_state['definition'])
|
358 |
+
st.session_state['coach_response'] = str(execute_query(index, chat_prompt_template, user_input))
|
359 |
st.sidebar.markdown(st.session_state['coach_response'])
|
360 |
|
361 |
|