Spaces:
Runtime error
Runtime error
tuned model
Browse files
app.py
CHANGED
@@ -74,14 +74,11 @@ def LemNormalize(text):
|
|
74 |
return LemTokens(nltk.word_tokenize(text.lower().translate(remove_punct_dict)))
|
75 |
|
76 |
def NLTK(input):
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
return bot(sent_tokens)
|
83 |
-
except :
|
84 |
-
print("Exception")
|
85 |
|
86 |
def bot(sent_tokens):
|
87 |
robo1_response = ''
|
|
|
74 |
return LemTokens(nltk.word_tokenize(text.lower().translate(remove_punct_dict)))
|
75 |
|
76 |
def NLTK(input):
|
77 |
+
f = open('corpus.txt', errors='strict')
|
78 |
+
data = f.read()
|
79 |
+
data = data.lower()
|
80 |
+
sent_tokens = nltk.sent_tokenize(data)
|
81 |
+
return bot(sent_tokens)
|
|
|
|
|
|
|
82 |
|
83 |
def bot(sent_tokens):
|
84 |
robo1_response = ''
|