Spaces:
Sleeping
Sleeping
Neurolingua
commited on
Commit
•
c14c319
1
Parent(s):
b8f64be
Update app.py
Browse files
app.py
CHANGED
@@ -67,8 +67,8 @@ def whatsapp_webhook():
|
|
67 |
elif 'bookkeeping' in incoming_msg:
|
68 |
response_text = "Please provide the details you'd like to record."
|
69 |
elif ('rates' in incoming_msg.lower()) or ('price' in incoming_msg.lower()) or ('market' in incoming_msg.lower()) or ('rate' in incoming_msg.lower()) or ('prices' in incoming_msg.lower()):
|
70 |
-
|
71 |
-
|
72 |
|
73 |
else:
|
74 |
# Generate response considering the chat history
|
@@ -97,7 +97,7 @@ def send_message(to, body):
|
|
97 |
def send_initial_message(to_number):
|
98 |
send_message(
|
99 |
f'whatsapp:{to_number}',
|
100 |
-
'Welcome to the Agri AI Chatbot! How can I assist you today?
|
101 |
)
|
102 |
|
103 |
if __name__ == '__main__':
|
|
|
67 |
elif 'bookkeeping' in incoming_msg:
|
68 |
response_text = "Please provide the details you'd like to record."
|
69 |
elif ('rates' in incoming_msg.lower()) or ('price' in incoming_msg.lower()) or ('market' in incoming_msg.lower()) or ('rate' in incoming_msg.lower()) or ('prices' in incoming_msg.lower()):
|
70 |
+
rate_data=get_rates()
|
71 |
+
response_text=generate_response(incoming_msg+'data'+rate_data, chat_history)
|
72 |
|
73 |
else:
|
74 |
# Generate response considering the chat history
|
|
|
97 |
def send_initial_message(to_number):
|
98 |
send_message(
|
99 |
f'whatsapp:{to_number}',
|
100 |
+
'Welcome to the Agri AI Chatbot! How can I assist you today?'
|
101 |
)
|
102 |
|
103 |
if __name__ == '__main__':
|