Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,10 +74,11 @@ def main():
|
|
| 74 |
# Clear the input
|
| 75 |
st.session_state.query = ""
|
| 76 |
|
| 77 |
-
# Display chat history
|
|
|
|
| 78 |
for chat in st.session_state.chat_history:
|
| 79 |
-
|
| 80 |
-
|
| 81 |
|
| 82 |
except Exception as e:
|
| 83 |
logging.error(f"An error occurred: {e}")
|
|
|
|
| 74 |
# Clear the input
|
| 75 |
st.session_state.query = ""
|
| 76 |
|
| 77 |
+
# Display chat history in a text area
|
| 78 |
+
history_text = ""
|
| 79 |
for chat in st.session_state.chat_history:
|
| 80 |
+
history_text += f"Q: {chat['question']}\nA: {chat['answer']}\n{chat['time']}\n---\n"
|
| 81 |
+
st.text_area("Chat History", history_text, height=300)
|
| 82 |
|
| 83 |
except Exception as e:
|
| 84 |
logging.error(f"An error occurred: {e}")
|