Spaces:
Sleeping
Sleeping
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") | |