Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,22 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
st.set_page_config(page_title= "Chat with Websites", page_icon="🤖")
|
| 4 |
|
| 5 |
st.title("Chat with Websites")
|
| 6 |
|
|
|
|
|
|
|
| 7 |
with st.sidebar:
|
| 8 |
st.header("Settings")
|
| 9 |
website_url = st.text_input("Website URL")
|
|
@@ -11,13 +24,13 @@ with st.sidebar:
|
|
| 11 |
|
| 12 |
user_query = st.chat_input("Type your message here...")
|
| 13 |
if user_query is not None and user_query !="":
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
|
| 23 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def get_response(user_input):
|
| 6 |
+
return "I dont know"
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
st.set_page_config(page_title= "Chat with Websites", page_icon="🤖")
|
| 15 |
|
| 16 |
st.title("Chat with Websites")
|
| 17 |
|
| 18 |
+
|
| 19 |
+
#sidebar
|
| 20 |
with st.sidebar:
|
| 21 |
st.header("Settings")
|
| 22 |
website_url = st.text_input("Website URL")
|
|
|
|
| 24 |
|
| 25 |
user_query = st.chat_input("Type your message here...")
|
| 26 |
if user_query is not None and user_query !="":
|
| 27 |
+
response = get_response(user_query)
|
| 28 |
+
|
| 29 |
+
with st.chat_message("Human"):
|
| 30 |
+
st.write(user_query)
|
| 31 |
|
| 32 |
+
with st.chat_message("AI"):
|
| 33 |
+
st.write(response)
|
| 34 |
|
| 35 |
|
| 36 |
|