CoolFace
Apppublic

Yatheshr/DAP_Query_Agent

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
app.py18 linesDownload Raw Back to src
1import streamlit as st2from sql_agent import create_dap_sql_agent3 4st.set_page_config(page_title="DAP Query Agent", layout="wide")5st.title("AI-Powered Document Analytics Agent")6 7query = st.text_input("Ask a question about the DAP database:")8 9if query:10    try:11        agent = create_dap_sql_agent()12        with st.spinner("Processing your query..."):13            result = agent.run(query)14        st.success("Answer:")15        st.write(result)16    except Exception as e:17        st.error(f"Error: {str(e)}")18