parthib07's picture
Upload 4 files
1d7eb48 verified
raw
history blame contribute delete
624 Bytes
import streamlit as st
from bot import chatbot
st.title("Agent Based Bot")
st.write("Ask any question, and I'll try to answer it!")
mybot = chatbot()
workflow = mybot()
config = {"configurable": {"thread_id": "1"}}
question = st.text_input("Enter your question here:")
if st.button("Get Answer"):
if question:
response = workflow.invoke({"messages": [question]}, config=config)
st.write("**Answer:**", response['messages'][-1].content)
else:
st.warning("Please enter a question to get an answer.")
st.markdown("---")
st.caption("Powered by Streamlit and LangGraph")