File size: 375 Bytes
2a3c721 c0b6228 2a3c721 c0b6228 2a3c721 557ee57 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import streamlit as st
from chatbot import process_query
user_input = st.query_params.get("user_input", [""])[0]
if user_input:
response = process_query(user_input)
# Display as JSON for HTTP GET request
st.json({"response": response})
else:
st.title("Chatbot")
st.write("Enter a query in the URL as ?user_input=your_question to get a JSON response.")
|