fixed again :(
Browse files
app.py
CHANGED
|
@@ -1,14 +1,12 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from chatbot import process_query
|
| 3 |
|
| 4 |
-
|
| 5 |
-
user_input = st.experimental_get_query_params().get("user_input", [""])[0]
|
| 6 |
|
| 7 |
if user_input:
|
| 8 |
response = process_query(user_input)
|
| 9 |
# Display as JSON for HTTP GET request
|
| 10 |
st.json({"response": response})
|
| 11 |
else:
|
| 12 |
-
# Default UI if no query is passed
|
| 13 |
st.title("Chatbot")
|
| 14 |
st.write("Enter a query in the URL as ?user_input=your_question to get a JSON response.")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from chatbot import process_query
|
| 3 |
|
| 4 |
+
user_input = st.query_params.get("user_input", [""])[0]
|
|
|
|
| 5 |
|
| 6 |
if user_input:
|
| 7 |
response = process_query(user_input)
|
| 8 |
# Display as JSON for HTTP GET request
|
| 9 |
st.json({"response": response})
|
| 10 |
else:
|
|
|
|
| 11 |
st.title("Chatbot")
|
| 12 |
st.write("Enter a query in the URL as ?user_input=your_question to get a JSON response.")
|