Neurolingua commited on
Commit
b410aca
·
verified ·
1 Parent(s): 5eda696

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -70,7 +70,7 @@ def whatsapp_webhook():
70
  else:
71
  # Handle PDF processing
72
  filepath = download_and_save_as_txt(media_url, account_sid, auth_token)
73
- response_text = process_and_query_pdf(filepath)
74
  elif ('weather' in incoming_msg.lower()) or ('climate' in incoming_msg.lower()) or (
75
  'temperature' in incoming_msg.lower()):
76
  response_text = get_weather(incoming_msg.lower())
@@ -83,6 +83,8 @@ def whatsapp_webhook():
83
  elif ('news' in incoming_msg.lower()) or ('information' in incoming_msg.lower()):
84
  news = get_news()
85
  response_text = generate_response(incoming_msg + ' data is ' + str(news), chat_history)
 
 
86
  else:
87
  response_text = generate_response(incoming_msg, chat_history)
88
 
 
70
  else:
71
  # Handle PDF processing
72
  filepath = download_and_save_as_txt(media_url, account_sid, auth_token)
73
+ response_text = 'PDF uploaded successfully'
74
  elif ('weather' in incoming_msg.lower()) or ('climate' in incoming_msg.lower()) or (
75
  'temperature' in incoming_msg.lower()):
76
  response_text = get_weather(incoming_msg.lower())
 
83
  elif ('news' in incoming_msg.lower()) or ('information' in incoming_msg.lower()):
84
  news = get_news()
85
  response_text = generate_response(incoming_msg + ' data is ' + str(news), chat_history)
86
+ elif ('pdf' in incoming_msg.lower()):
87
+ response_text =respond_pdf(incoming_msg)
88
  else:
89
  response_text = generate_response(incoming_msg, chat_history)
90