Illia56 commited on
Commit
bf63594
·
1 Parent(s): d750342

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -62,11 +62,11 @@ if prompt := st.chat_input("Ask Palm 2 anything..."):
62
  st.markdown(response['content'])
63
 
64
  if response['code']:
65
- if st.button('Run Code'):
66
  # with st.status("Running code..."):
67
- try:
68
- exec(response['code'])
69
- except Exception as e:
70
- st.write(f"ERROR {e}...")
71
  # Add assistant response to chat history
72
  st.session_state.messages.append({"role": "assistant", "content": response['content']})
 
62
  st.markdown(response['content'])
63
 
64
  if response['code']:
65
+ # if st.button('Run Code'):
66
  # with st.status("Running code..."):
67
+ try:
68
+ exec(response['code'])
69
+ except Exception as e:
70
+ st.write(f"ERROR {e}...")
71
  # Add assistant response to chat history
72
  st.session_state.messages.append({"role": "assistant", "content": response['content']})