Spaces:
Sleeping
Sleeping
File size: 624 Bytes
1d7eb48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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")
|