ayush5710 commited on
Commit
223fc1d
1 Parent(s): 604c041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- if code_interpreter:
70
- exec(response['code'])
 
 
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']})