Illia56 commited on
Commit
4cde0cd
·
1 Parent(s): be772b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -62,14 +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
-
72
-
73
-
74
  # Add assistant response to chat history
75
  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']})