DEV Community

Upkar Lidder
Upkar Lidder

Posted on • Originally published at Medium on

2

NLP, Visual Recognition and Serverless example — a chatbot moderator

NLP, Visual Recognition and Serverless example — a chatbot moderator

IBM team presenting a webinar

Lisa Jung and I presented a webinar on creating a chatbot moderator that tells people to be polite when they say something rude on Slack or post an appropriate picture. For the image bit, we changed the code to treat any dog pictures as rude pictures instead of looking for explicit pictures.

We used a couple of different IBM Services in this demo.

  1. We used IBM Natural Language Understanding to analyze text for rudeness. You can find more information here.

Analyzing a speech at the Federal Reserve Bank using IBM Natural Language Understanding service

  1. We used IBM Visual Recognition service to detect explicit pictures (pictures of a dog in this case). Read more here.

Analyzing an image with IBM Watson Visual Recognition Service

  1. Finally, we used IBM Cloud Functions as the serverless platform to glue everything together. Learn more here.

This is the flow of the use case:

  1. The user enters text or an image in a Slack channel.
  2. Slack pushes this content to the IBM Cloud Function action.
  3. If the input was text, the action invokes Watson Natural Language Understanding service to determine the rudeness.
  4. If the input was an image, the action invokes Watson Visual Recognition service to determine if it is not safe for the channel.
  5. If the input was “bad”, the action removed the image and tells the user to be more polite. It does so by posting directly in the Slack channel.

a chatbot moderator

You can view the full recording on crowdcast.io [https://www.crowdcast.io/e/a-moderator-using-nlp-vr]. You can get the complete code and try it out for yourself in this github repository. Hope that was fun! Join us for future webinars, in person meetings and workshops!

Thanks Max Katz and IBM Developer for hosting!

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry 🕒

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay