Back to Projects

AI-Powered CMS

AI-powered CMS with content generation, image recognition, and voice input.

Craft CMSOpenAIPythonTensorFlowReactD3.js

Overview

An AI-Powered CMS is an innovative content management system, which is designed to utilise artificial intelligence, to deliver smarter and more engaging content creation and management capabilities. This topic highlights my varied work in integrating AI capabilities into CMS platforms, providing features such as content generation, image recognition, and voice input.

Key Experiences

AI-Driven Content Generation

  • Integrated OpenAI’s GPT models providing automated content creation such as articles, descriptions, and more with minimal effort.
  • Provided customisable prompts tailored to specific business requirements.

Image Recognition and Management

  • Utilized TensorFlow to provide image recognition capabilities, allowing admins to tag and categorise media assets automatically.
  • Streamlined image search and organisation within various CMS platforms, improving efficiency for media-heavy projects.

Voice Input for Content Creation

  • Developed voice input functionality using Python and browser APIs, allowing admins and content creators to dictate their content directly into the CMS.
  • Enabled real-time transcription and editing to simplify content creation.

Interactive Data Visualization

  • Designed dynamic dashboards with React and D3.js, providing visual insights into user engagement, content performance, and site usage.
  • Integrated real-time analytics to support data-driven decision-making.

Sample Implementations

AI Content Generation Module

The following simplified example adds an AI-powered content generator into Craft CMS for creating blog posts and product descriptions:

code
<?php
require 'vendor/autoload.php';

use OpenAI\Client;

function generateContent($prompt) {
    $client = new Client(["api_key" => "<your-api-key>"]);
    $response = $client->completions()->create([
        "model" => "text-davinci-003",
        "prompt" => $prompt,
        "max_tokens" => 500
    ]);
    return $response["choices"][0]["text"];
}

// Example Usage
$prompt = "Write a blog post about the benefits of AI in content management systems.";
$content = generateContent($prompt);
echo $content;
?>

Image Recognition Integration

The following simplified example demonstrates image recognition to auto-tag uploaded assets using a python microservice:

code
import tensorflow as tf
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.applications.inception_v3 import preprocess_input, decode_predictions
from PIL import Image
import numpy as np

model = InceptionV3(weights='imagenet')

def recognize_image(image_path):
    image = Image.open(image_path).resize((299, 299))
    array = np.expand_dims(preprocess_input(np.array(image)), axis=0)
    predictions = model.predict(array)
    return decode_predictions(predictions, top=3)

# Example Usage
results = recognize_image("example.jpg")
print(results)

Voice Input Integration

The following simplified example shows how to enable voice-to-text functionality directly within the CMS editor:

code
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
const recognition = new SpeechRecognition();

recognition.onresult = (event) => {
  const transcript = event.results[0][0].transcript;
  document.getElementById("editor").value += transcript;
};

function startDictation() {
  recognition.start();
}

// Example HTML
<button onclick="startDictation()">Start Dictation</button>
<textarea id="editor"></textarea>

My Results and Impact

  • Reduced content creation time with AI-powered automation.
  • Improved media organisation and retrieval with advanced tagging features.
  • Enhanced accessibility and productivity through voice input.
  • Provided visually engaging analytics dashboards.

Example Tools and Technologies

  • Craft CMS: Core CMS platform
  • OpenAI: AI-powered content generation
  • Python &amp; TensorFlow: Image recognition
  • React &amp; D3.js: Interactive dashboards

Conclusion

This topic demonstrates my ability to integrate advanced AI and machine learning technologies, into almost any CMS platforms. The solutions I have engineered provide admins and creators the ability to create, manage, and analyse content more effectively, while staying ahead in the ever-evolving digital landscape.