Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,20 +10,7 @@ from streamlit_chat import message
|
|
| 10 |
from PIL import Image
|
| 11 |
|
| 12 |
st.title("Nexus TCM Chatbot")
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
def clear_query_on_change():
|
| 16 |
-
# Your logic for processing the query and generating a response goes here
|
| 17 |
-
response = f"User entered: {st.session_state.input}"
|
| 18 |
-
st.write(response)
|
| 19 |
-
|
| 20 |
-
# Create the search bar with on_change event
|
| 21 |
-
query = st.text_input("Query:", key="input", on_change=clear_query_on_change)
|
| 22 |
-
|
| 23 |
-
# Check if the user has entered a new query
|
| 24 |
-
if 'input' in st.session_state:
|
| 25 |
-
# This callback is now called without arguments, as the value is automatically used
|
| 26 |
-
clear_query_on_change()
|
| 27 |
|
| 28 |
# Set the logo URL
|
| 29 |
#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 |
# Set the logo URL
|
| 16 |
#logo_url = "https://huggingface.co/spaces/mathslearn/chatbot_test_streamlit/blob/main/logo.jpeg"
|