Git Product home page Git Product logo

matejvasek / telegram-image-analysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boson-samples/telegram-image-analysis

0.0 1.0 0.0 2.98 MB

A sample application illustrating the use of OpenShift Serverless Functions, Camel-K and Telegram to do AI image analysis on Telegram chat messages.

Home Page: https://www.openshift.com/learn/topics/serverless

JavaScript 28.78% Java 38.78% Go 30.30% Shell 2.13%

telegram-image-analysis's Introduction

Telegram Image Analysis with OpenShift Serverless Functions

In this demo, you will learn how Serverless Functions can be used to do facial recognition in the Telegram chat.

Here you can watch a recording of this demo:

OpenShift Serverless Functions - Telegram Image Analysis Demo

Setup

  • OpenShift 4.6 (or newer)
  • Red Hat OpenShift Serverless - installed as an operator from OperatorHub (version >= 1.11.0)
    • To install on a cluster that does not have this available, clone the serverless operator repository, ensure that you are logged into your OpenShift cluster and run make images install
  • Red Hat Integration - Camel K - installed as an operator from OperatorHub (version >= 1.2.0)

You will also need the following API keys and accounts

Set the API keys for Telegram and MS Faces API

  • Set the Telegram API Key in the following files

    • deploy/kamelet-broker.yaml
    • receiver/func.yaml
    • responder/func.yaml
    • responder/package.json
  • Set the Microsoft Faces API Key in the following files

    • processor/func.yaml

Create the default broker

oc apply -f deploy/broker.yaml

Connect to Telegram via CamelSource

The demo uses Telegram to send images to a bot. A CamelSource is used to receive these images and convert them to a CloudEvent which can then be sent to a Knative event sink to be processed by functions. Install the Telegram Kamelet which handeles the creation of CamelSource and binding it to the Broker for you..

kubectl apply -f kamelet-broker.yaml

Create the image receiver

Export image registry that's being to used to store function images, if you haven't done so:

export FUNC_REGISTRY=docker.io/johndoe

Deploy receiver:

kn func deploy -p receiver

And connect it to the Broker:

oc apply -f deploy/trigger-receiver.yaml

Create the image processor

Deploy processor:

kn func deploy -p processor

And connect it to the Broker:

oc apply -f deploy/trigger-processor.yaml

Create the responder

Deploy responder:

kn func deploy -p responder

And connect it to the Broker:

oc apply -f deploy/trigger-responder.yaml

telegram-image-analysis's People

Contributors

lance avatar zroubalik avatar matejvasek avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.