Spaces:
Sleeping
Sleeping
config: completed
Browse files- src/streamlit_app.py +15 -1
src/streamlit_app.py
CHANGED
|
@@ -354,4 +354,18 @@ def main() -> None:
|
|
| 354 |
st.error("Please check your inputs and API Key and try again")
|
| 355 |
except Exception as e:
|
| 356 |
st.error(f"Error during analysis: {str(e)}")
|
| 357 |
-
st.error("Please check your inputs and API Key and try again")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
st.error("Please check your inputs and API Key and try again")
|
| 355 |
except Exception as e:
|
| 356 |
st.error(f"Error during analysis: {str(e)}")
|
| 357 |
+
st.error("Please check your inputs and API Key and try again")
|
| 358 |
+
|
| 359 |
+
# Adding a sidebar for history management
|
| 360 |
+
with st.sidebar:
|
| 361 |
+
st.subheader("Options")
|
| 362 |
+
if st.checkbox("Show analysis history"):
|
| 363 |
+
for message in st.session_state.messages:
|
| 364 |
+
with st.chat_message(message["role"]):
|
| 365 |
+
st.markdown(message["content"])
|
| 366 |
+
|
| 367 |
+
if st.button("Clear History"):
|
| 368 |
+
st.session_state.messages = []
|
| 369 |
+
st.rerun()
|
| 370 |
+
if __name___ == "__main__":
|
| 371 |
+
main()
|