Illia56 commited on
Commit
56b843a
·
1 Parent(s): 376b6d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -68,10 +68,17 @@ if prompt := st.chat_input("Ask Palm 2 anything..."):
68
  with st.chat_message("assistant", avatar='🌴'):
69
  st.markdown(response['content'])
70
 
71
- if response['code'] and code_interpreter:
72
- try:
73
- exec(response['code'])
74
- except Exception as e:
75
- st.write(f"ERROR {e}...")
 
 
 
 
 
 
 
76
 
77
  # st.session_state.messages.append({"role": "assistant", "content": response['content']})
 
68
  with st.chat_message("assistant", avatar='🌴'):
69
  st.markdown(response['content'])
70
 
71
+ if response['code']:
72
+ url = bard.export_replit(
73
+ code=response['code'],
74
+ program_lang=response['program_lang'],
75
+ )['url']
76
+ st.title('Export to repl.it')
77
+ st.text(url)
78
+ if code_interpreter:
79
+ try:
80
+ exec(response['code'])
81
+ except Exception as e:
82
+ st.write(f"ERROR {e}...")
83
 
84
  # st.session_state.messages.append({"role": "assistant", "content": response['content']})