Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -130,10 +130,10 @@ from langchain.agents import Tool
|
|
130 |
#Defining the list of tool objects to be used by LangChain.
|
131 |
tools = [
|
132 |
Tool(
|
133 |
-
name='
|
134 |
func=qa.run,
|
135 |
description=(
|
136 |
-
'use this tool when answering
|
137 |
'more information about the topic'
|
138 |
)
|
139 |
)
|
@@ -182,7 +182,7 @@ def continue_conversation(input, history):
|
|
182 |
|
183 |
# Streamlit UI
|
184 |
def main():
|
185 |
-
st.set_page_config(page_title="
|
186 |
st.title("Medical Chatbot")
|
187 |
|
188 |
# Initialize the conversation history
|
@@ -200,12 +200,12 @@ def main():
|
|
200 |
# Display the chat history with the latest conversation at the top
|
201 |
for chat in st.session_state.history:
|
202 |
if chat['role'] == 'Patient':
|
203 |
-
chat_container.markdown(f"**
|
204 |
else:
|
205 |
-
chat_container.markdown(f"**
|
206 |
|
207 |
# User input text box at the bottom
|
208 |
-
user_input = st.text_input("Ask a question:", key="input", placeholder="
|
209 |
|
210 |
if user_input:
|
211 |
# Get the response and update the conversation history
|
|
|
130 |
#Defining the list of tool objects to be used by LangChain.
|
131 |
tools = [
|
132 |
Tool(
|
133 |
+
name='Hydroponic Knowledge database',
|
134 |
func=qa.run,
|
135 |
description=(
|
136 |
+
'use this tool when answering Hydroponic knowledge queries to get '
|
137 |
'more information about the topic'
|
138 |
)
|
139 |
)
|
|
|
182 |
|
183 |
# Streamlit UI
|
184 |
def main():
|
185 |
+
st.set_page_config(page_title="Hydroponic AI Chatbot", page_icon="👨⚕️")
|
186 |
st.title("Medical Chatbot")
|
187 |
|
188 |
# Initialize the conversation history
|
|
|
200 |
# Display the chat history with the latest conversation at the top
|
201 |
for chat in st.session_state.history:
|
202 |
if chat['role'] == 'Patient':
|
203 |
+
chat_container.markdown(f"**Agricultor:** {chat['message']}")
|
204 |
else:
|
205 |
+
chat_container.markdown(f"**Hydroponic AI Assistant:** {chat['message']}")
|
206 |
|
207 |
# User input text box at the bottom
|
208 |
+
user_input = st.text_input("Ask a question:", key="input", placeholder="Tell me what do you want to know ?")
|
209 |
|
210 |
if user_input:
|
211 |
# Get the response and update the conversation history
|