text: import pickle
  import numpy as np
  from .data import pickle_maker
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense, Dropout
  from tensorflow.keras.optimizers import SGD
  
  
  def model_making():
      pickle_maker()
      with open("data.pkl", "rb") as file:
          words, classes, train_x, train_y = pickle.load(file)
  
      # Create model - 3 layers. First layer 128 neurons, second layer 64 neurons and 3rd output layer contains number of neurons
      # equal to number of intents to predict output intent with softmax
      model = Sequential()
      model.add(Dense(128, input_shape=(len(train_x[0]),), activation='relu'))
      model.add(Dropout(0.5))
      model.add(Dense(64, activation='relu'))
      model.add(Dropout(0.5))
      model.add(Dense(len(train_y[0]), activation='softmax'))
  
      # Compile model. Stochastic gradient descent with Nesterov accelerated gradient gives good results for this model
      sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
      model.compile(loss='categorical_crossentropy',
                    optimizer=sgd, metrics=['accuracy'])
      hist = model.fit(np.array(train_x), np.array(train_y),
                       epochs=200, batch_size=5, verbose=1)
      model.save('./chatbot_model.h5', hist)
  