Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,17 @@ from streamlit_chat import message
|
|
10 |
from PIL import Image
|
11 |
|
12 |
st.title("Nexus TCM Chatbot")
|
13 |
-
query = st.text_input("Query: ", key="input")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
# Set the logo URL
|
16 |
#logo_url = "https://huggingface.co/spaces/mathslearn/chatbot_test_streamlit/blob/main/logo.jpeg"
|
|
|
10 |
from PIL import Image
|
11 |
|
12 |
st.title("Nexus TCM Chatbot")
|
13 |
+
#query = st.text_input("Query: ", key="input")
|
14 |
+
|
15 |
+
# Create the search bar with on_change event
|
16 |
+
query = st.text_input("Query:", key="input", on_change=clear_query_on_change)
|
17 |
+
|
18 |
+
# Check if the user has entered a new query
|
19 |
+
if query:
|
20 |
+
st.session_state.input = query # Save the input to session state
|
21 |
+
# Your logic for processing the query and generating a response goes here
|
22 |
+
response = f"User entered: {query}"
|
23 |
+
st.write(response)
|
24 |
|
25 |
# Set the logo URL
|
26 |
#logo_url = "https://huggingface.co/spaces/mathslearn/chatbot_test_streamlit/blob/main/logo.jpeg"
|