Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,11 +75,10 @@ qa = RetrievalQA.from_chain_type(
|
|
75 |
retriever=retriever,
|
76 |
chain_type_kwargs={"prompt": prompt},
|
77 |
)
|
78 |
-
|
79 |
import streamlit as st
|
80 |
|
81 |
-
# Streamlit interface
|
82 |
-
st.
|
83 |
|
84 |
# Define function to handle user input and display chatbot response
|
85 |
def chatbot_response(user_input):
|
@@ -87,13 +86,19 @@ def chatbot_response(user_input):
|
|
87 |
return response
|
88 |
|
89 |
# Streamlit components
|
|
|
|
|
90 |
user_input = st.text_input("You:", "")
|
91 |
-
submit_button = st.button("Send")
|
92 |
|
93 |
# Handle user input
|
94 |
if submit_button:
|
95 |
if user_input.strip() != "":
|
96 |
bot_response = chatbot_response(user_input)
|
97 |
-
st.
|
|
|
|
|
|
|
98 |
else:
|
99 |
-
st.warning("Please enter a message.")
|
|
|
|
75 |
retriever=retriever,
|
76 |
chain_type_kwargs={"prompt": prompt},
|
77 |
)
|
|
|
78 |
import streamlit as st
|
79 |
|
80 |
+
# Streamlit interface with improved aesthetics
|
81 |
+
st.set_page_config(page_title="Chatbot Interface", page_icon="🤖")
|
82 |
|
83 |
# Define function to handle user input and display chatbot response
|
84 |
def chatbot_response(user_input):
|
|
|
86 |
return response
|
87 |
|
88 |
# Streamlit components
|
89 |
+
st.markdown("# 🤖 **Chatbot Interface**")
|
90 |
+
|
91 |
user_input = st.text_input("You:", "")
|
92 |
+
submit_button = st.button("Send 📨")
|
93 |
|
94 |
# Handle user input
|
95 |
if submit_button:
|
96 |
if user_input.strip() != "":
|
97 |
bot_response = chatbot_response(user_input)
|
98 |
+
st.markdown("### You:")
|
99 |
+
st.markdown(f"> {user_input}")
|
100 |
+
st.markdown("### Bot:")
|
101 |
+
st.markdown(f"> {bot_response}")
|
102 |
else:
|
103 |
+
st.warning("⚠️ Please enter a message.")
|
104 |
+
|