Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ from secretsload import load_stsecrets # script to load credentials from Hugging
|
|
16 |
credentials = load_stsecrets()
|
17 |
|
18 |
st.set_page_config(
|
19 |
-
page_title="Jimmy
|
20 |
-
page_icon="
|
21 |
initial_sidebar_state="collapsed"
|
22 |
)
|
23 |
|
@@ -130,18 +130,18 @@ def get_response(user_input):
|
|
130 |
print(prompt_data, params)
|
131 |
|
132 |
# Generate and stream response
|
133 |
-
with st.chat_message("
|
134 |
stream = generate_response(watsonx_llm, prompt_data, params)
|
135 |
response = st.write_stream(stream)
|
136 |
|
137 |
# Add AI response to chat history
|
138 |
-
st.session_state.chat_history.append({"role": "
|
139 |
|
140 |
return response
|
141 |
|
142 |
def main():
|
143 |
initialize_session_state()
|
144 |
-
st.title("Jimmy
|
145 |
|
146 |
# User input
|
147 |
if anton_ego_jimmy.DISPLAY_CHAT_HISTORY == 1:
|
|
|
16 |
credentials = load_stsecrets()
|
17 |
|
18 |
st.set_page_config(
|
19 |
+
page_title="Jimmy",
|
20 |
+
page_icon="π§",
|
21 |
initial_sidebar_state="collapsed"
|
22 |
)
|
23 |
|
|
|
130 |
print(prompt_data, params)
|
131 |
|
132 |
# Generate and stream response
|
133 |
+
with st.chat_message("Jimmy", avatar="π§"):
|
134 |
stream = generate_response(watsonx_llm, prompt_data, params)
|
135 |
response = st.write_stream(stream)
|
136 |
|
137 |
# Add AI response to chat history
|
138 |
+
st.session_state.chat_history.append({"role": "Jimmy", "content": response})
|
139 |
|
140 |
return response
|
141 |
|
142 |
def main():
|
143 |
initialize_session_state()
|
144 |
+
st.title("Jimmy π§")
|
145 |
|
146 |
# User input
|
147 |
if anton_ego_jimmy.DISPLAY_CHAT_HISTORY == 1:
|