Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,13 @@ from chatterbot.trainers import ListTrainer
|
|
4 |
from chatterbot.trainers import ChatterBotCorpusTrainer
|
5 |
|
6 |
|
7 |
-
chatbot = ChatBot("Chatpot",storage_adapter='chatterbot.storage.SQLStorageAdapter',database_uri = 'sqlite:///database.sqlite3'
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
|
10 |
|
@@ -17,7 +23,7 @@ chatbot = ChatBot("Chatpot",storage_adapter='chatterbot.storage.SQLStorageAdapte
|
|
17 |
#trainer.train(training_data)
|
18 |
|
19 |
trainer = ChatterBotCorpusTrainer(chatbot)
|
20 |
-
trainer.train("chatterbot.corpus.english")
|
21 |
|
22 |
#print(training_data)
|
23 |
|
|
|
4 |
from chatterbot.trainers import ChatterBotCorpusTrainer
|
5 |
|
6 |
|
7 |
+
chatbot = ChatBot("Chatpot",storage_adapter='chatterbot.storage.SQLStorageAdapter',database_uri = 'sqlite:///database.sqlite3',
|
8 |
+
logic_adapters=[ {
|
9 |
+
"import_path": "chatterbot.logic.BestMatch",
|
10 |
+
"statement_comparison_function": chatterbot.comparisons.LevenshteinDistance,
|
11 |
+
"response_selection_method": chatterbot.response_selection.get_first_response
|
12 |
+
}
|
13 |
+
])
|
14 |
|
15 |
|
16 |
|
|
|
23 |
#trainer.train(training_data)
|
24 |
|
25 |
trainer = ChatterBotCorpusTrainer(chatbot)
|
26 |
+
trainer.train("chatterbot.corpus.english","chatterbot.corpus.english.ai")
|
27 |
|
28 |
#print(training_data)
|
29 |
|