TEACHABLE MACHINE MODEL & UNITY

Hello,
I have a “little” struggle here. My problem is that I am not good with C# or Java.
I’ll appreciate very much if somebody helps me with my little project that I can’t attach but I can send in e-mail.
I want to integrate TM model in simple UNITY 2D game.
I made a Teachable Machine Model (Tensorflow PoseNet Model) that recognize Jumping-Jack pose (class1) and everything that is not Jumping-Jack pose (Class2). Input is from WebCam (LIVE).
My model is on picture below :

Game is very simple. On PLAY mode my player is moving constantly and when I press “space” key, player jumps. (picture below)

I need to ::: ********************************************

  1. include WebCam

  2. include my model using link : Teachable Machine

  3. add variable “Classifier” with labels class1 / class2

  4. change condition: " if(space is pressed) DO JUMP " in " if (classifier == “class1”) DO JUMP "


Here are some links that might help to someone who is better with C# and Java than I am :
Machine Learning For Web: Final – dylan dawkins blog


This is a code that I have so far - Script is attached:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class kretanje1 : MonoBehaviour
{
Rigidbody2D rb;

// Player Movement Variables/....
public static int movespeed = 3;
public Vector3 userDirection = Vector3.right;

public float jumpForce;

void Start()  // Start is called before the first frame update
{
    rb = GetComponent<Rigidbody2D>();
}

void Jump()
{
    if (Input.GetKeyDown(KeyCode.Space))
    {
        rb.velocity = new Vector2(rb.velocity.x, jumpForce);
    }
}

void Update()      // Update is called once per frame
{
    transform.Translate(userDirection * movespeed * Time.deltaTime);
    Jump();
}

}

I tried implementing tensor flow in unity but above the unity own ML Agents things get very difficult to implement. May be you can use backend api to send data from the model to realtime database using firebase and link firebase to unity.