FalconBot / app.py
imSleepy's picture
fixed again :(
c0b6228 verified
raw
history blame
375 Bytes
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.")