Spaces:
Sleeping
Sleeping
File size: 829 Bytes
ae4e44e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
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)
|