input: Write a function to create a machine learning model in Python using Keras that distinguishes between cats and dogs. The function should return the compiled model. The dataset is an 800-image dataset of cats and dogs located at the specified directory path. Use the provided model architecture and data generator settings.
  
  assert create_model('/path/to/dataset')
  assert isinstance(create_model('/path/to/dataset'), keras.models.Sequential)
  assert create_model('/path/to/dataset').input_shape == (None, 64, 64, 3)
  assert create_model('/path/to/dataset').output_shape == (None, 1)
output: def create_model(directory):
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
      from tensorflow.keras.preprocessing.image import ImageDataGenerator
  
      model = Sequential([
          Conv2D(32, (3, 3), activation='relu', input_shape=(64, 64, 3)),
          MaxPooling2D(pool_size=(2, 2)),
          Conv2D(64, (3, 3), activation='relu'),
          MaxPooling2D(pool_size=(2, 2)),
          Flatten(),
          Dense(128, activation='relu'),
          Dense(1, activation='sigmoid')
      ])
  
      model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
  
      datagen = ImageDataGenerator(rescale=1./255)
      train_generator = datagen.flow_from_directory(
          directory,
          target_size=(64, 64),
          batch_size=32,
          class_mode='binary'
      )
  
      return model