Update app.py
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ if prompt := st.chat_input("Ask Palm 2 anything..."):
|
|
91 |
|
92 |
with st.status("Rebuilding code..."): # Status indicating code is being rebuilt
|
93 |
# Ask the AI model to regenerate the code and mention the problem
|
94 |
-
new_prompt = f"{prompt} . There was an error executing the code: {e}. Can you provide a corrected version?"
|
95 |
new_response = predict(new_prompt)
|
96 |
|
97 |
with st.chat_message("assistant", avatar='🌴'):
|
|
|
91 |
|
92 |
with st.status("Rebuilding code..."): # Status indicating code is being rebuilt
|
93 |
# Ask the AI model to regenerate the code and mention the problem
|
94 |
+
new_prompt = f"{prompt} . There was an error executing the code: {e}. The last code you provided was: ```{current_code}```. Can you provide a corrected version?"
|
95 |
new_response = predict(new_prompt)
|
96 |
|
97 |
with st.chat_message("assistant", avatar='🌴'):
|