imSleepy commited on
Commit
c0b6228
1 Parent(s): 2313b29

fixed again :(

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,14 +1,12 @@
1
  import streamlit as st
2
- from chatbot import process_query # Your chatbot function
3
 
4
- # Check if a query parameter `user_input` exists
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.")