pout(0.5),
        Dense(len(df['plastic_type'].unique()), activation='softmax')  # Output layer for classification
    ])
    
    model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
    model.fit(data_gen.flow(train_data['image_path'], train_data['encoded_labels'], batch_size=32), epochs=30)
            </code></pre>
      <p>Train a convolutional neural network (CNN) model to classify plastic waste types based on images, facilitating
        the sorting and recyc