Update app.py
Browse files
app.py
CHANGED
|
@@ -197,9 +197,20 @@ india = gpd.read_file("https://gist.githubusercontent.com/jbrobst/56c13bbbf9d97d
|
|
| 197 |
if code is not None:
|
| 198 |
# Add agent response to chat history
|
| 199 |
print("Adding response")
|
|
|
|
| 200 |
st.session_state.responses.append(response)
|
| 201 |
show_response(st, response)
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
if no_response:
|
| 204 |
print("No response")
|
| 205 |
st.error(f"Failed to generate right output due to the following error:\n\n{exception}")
|
|
|
|
| 197 |
if code is not None:
|
| 198 |
# Add agent response to chat history
|
| 199 |
print("Adding response")
|
| 200 |
+
|
| 201 |
st.session_state.responses.append(response)
|
| 202 |
show_response(st, response)
|
| 203 |
|
| 204 |
+
user_comment = st.text_input("Enter your comment:",key = 501)
|
| 205 |
+
|
| 206 |
+
check = st.button("Submit",key = 301)
|
| 207 |
+
|
| 208 |
+
with open("user_comments.txt", "a") as file:
|
| 209 |
+
if check:
|
| 210 |
+
# Store the comment in the text file
|
| 211 |
+
file.write(user_comment + "\n")
|
| 212 |
+
st.success("Comment submitted successfully!")
|
| 213 |
+
|
| 214 |
if no_response:
|
| 215 |
print("No response")
|
| 216 |
st.error(f"Failed to generate right output due to the following error:\n\n{exception}")
|