Spaces:
Sleeping
Sleeping
Download app.py from Himanshu2003/ChronoQuery: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/spaces/Himanshu2003/ChronoQuery/resolve/main/app.py
- Command line
-
hf download hf://spaces/Himanshu2003/ChronoQuery/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Himanshu2003/ChronoQuery/resolve/main/app.py
829 Bytes
| 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) | |