Update app.py
Browse files
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(
|
176 |
-
reg_ex = re.search('from wikipedia (.*)',
|
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(
|
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 |
|