Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,8 +66,10 @@ if prompt := st.chat_input("Ask 🦔 anything..."):
|
|
66 |
st.markdown(response['content'])
|
67 |
|
68 |
if response['code']:
|
69 |
-
|
70 |
-
|
|
|
|
|
71 |
|
72 |
|
73 |
st.session_state.messages.append({"role": "assistant", "content": response['content']})
|
|
|
66 |
st.markdown(response['content'])
|
67 |
|
68 |
if response['code']:
|
69 |
+
try:
|
70 |
+
exec(response['code'])
|
71 |
+
except Exception as e:
|
72 |
+
st.write(f"End of explanation..")
|
73 |
|
74 |
|
75 |
st.session_state.messages.append({"role": "assistant", "content": response['content']})
|