Skip to content

Commit 9a4fc61

Browse files
committed
rebuilt nlp model
1 parent 29397b4 commit 9a4fc61

File tree

6 files changed

+7
-130
lines changed

6 files changed

+7
-130
lines changed

.DS_Store

0 Bytes
Binary file not shown.
File renamed without changes.

food_chat_app/models/db/startdb.py

-123
This file was deleted.
0 Bytes
Binary file not shown.

food_chat_app/models/nlp/predictor.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def build(self):
5858
5959
'''
6060

61-
vocab, classes, document_map = self.process_intents()
62-
training = self.build_training_set(vocab, classes, document_map)
63-
self.build_dl_model(training)
61+
vocab, classes, document_map = self._process_intents()
62+
training = self._build_training_set(vocab, classes, document_map)
63+
self._build_dl_model(training)
6464

65-
def process_intents(self):
65+
def _process_intents(self):
6666
'''Creates the vocab & classes lists and the document_map dict.
6767
Also pickles the vocab and classes list to be used later in our model.
6868
@@ -107,7 +107,7 @@ def process_intents(self):
107107

108108
return vocab, classes, document_map
109109

110-
def build_training_set(self, vocab, classes, document_map):
110+
def _build_training_set(self, vocab, classes, document_map):
111111
'''Build the training set for our DL model using vocab, classes
112112
and document_map lists.
113113
@@ -136,7 +136,7 @@ def build_training_set(self, vocab, classes, document_map):
136136
training = np.array(training)
137137
return training
138138

139-
def build_dl_model(self, training):
139+
def _build_dl_model(self, training):
140140
'''Build and save the DL model using our training set.
141141
layer 1: 128 neurons, relu
142142
layer 2: 64 neurons, relu

run_build_nlp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
if __name__ == '__main__':
77
predictor = Predictor()
8-
predictor.build()
8+
predictor.build()

0 commit comments

Comments
 (0)