ipvikas commited on
Commit
1ab4f04
1 Parent(s): 997b1af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -172,8 +172,8 @@ import re, string, unicodedata
172
  import wikipedia as wk #pip install wikipedia
173
  from collections import defaultdict
174
 
175
- def wikipedia_data(sentence):
176
- reg_ex = re.search('from wikipedia (.*)', sentence)#tell me about
177
  try:
178
  if reg_ex:
179
  topic = reg_ex.group(1)
@@ -208,7 +208,7 @@ def get_response(input_text):
208
  else:
209
  #if "From Wikipedia" in sentence:
210
  #if sentence:
211
- robo_response = wikipedia_data(sentence)
212
  return robo_response
213
 
214
 
 
172
  import wikipedia as wk #pip install wikipedia
173
  from collections import defaultdict
174
 
175
+ def wikipedia_data(input_text):
176
+ reg_ex = re.search('from wikipedia (.*)', input_text)#tell me about
177
  try:
178
  if reg_ex:
179
  topic = reg_ex.group(1)
 
208
  else:
209
  #if "From Wikipedia" in sentence:
210
  #if sentence:
211
+ robo_response = wikipedia_data(input_text)
212
  return robo_response
213
 
214