Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import main | |
| st.set_page_config( | |
| page_title="Historical Event Explainer", | |
| page_icon="🏛️", | |
| layout="wide" | |
| ) | |
| st.title("ChronoQuery: Explore History with AI 🕰️") | |
| st.markdown("Unlock the past — ask about any historical event and get instant, AI-powered insights.") | |
| with st.form(key="query_form"): | |
| user_query = st.text_input("Enter a historical event or question:") | |
| submit_button = st.form_submit_button(label="Submit") | |
| if submit_button and user_query: | |
| with st.spinner("⏳ Fetching historical insights..."): | |
| try: | |
| result = main.final_chain.invoke(user_query) | |
| st.write(result) | |
| except Exception as e: | |
| st.error("⚠️ Something went wrong. Please try again.") | |
| st.exception(e) | |