Coder Social home page Coder Social logo

aiknowthatfeel's Introduction

Workshop

AI Know that feel

This repository is intended for didactic purposes only.

The target is to build a bot (software agent) that "identifies the sentiment" of a conversation and embed it into a webapp.

During the workshop a github app (link provided by the lecturer) is installed on the repository to automatically evaluate a metric or a set of metrics on the models pushed to the forks.

Workflow:

  • The repository is forked and the github app (link provided by the lecturer) is installed
  • Introductory examples are presented
  • A ML model is trained and stored in models/model.h5 (e.g. Example 2)
  • A software agent in webpage/agent/wojak.py is embedded into a webapp (flask, webpage/sentiment.py). This agent uses the trained model to infer the sentiment of a conversation.

Webapp with the embedded agent using the ML model

webapp screenshot

Examples

  • Example 0:
    • Basic example from scratch.
    • Take aways:
      • Model: Linear regression
      • Error, Loss, Cost, Objective
      • Gradient descent, step size, convergence
      • Inference
  • Example 1:
    • Classic, crude sentiment analysis on the IMDB database
  • Example 1.1:
    • A very basic word encoder
  • Example 2:
    • Creating the bot model: Applying the example code to our target problem
  • Example 3:
    • Test the bot model: Simple model evaluation
  • Example 4:
    • Creating the bot: Using specialized hardware GPU/TPU

Running the webapp

More info on running flask apps

Linux

export FLASK_APP=webpage/sentiment.py
flask run --port 5001

Windows PowerShell:

$env:FLASK_APP = "webpage/sentiment.py"
flask run --port 5001

Description of additional content

These files are intended to aid and orchestrate the process and are not needed to be modified.

  • evaluate_model.py:
    • Used within a container (see ./Dockerfile) to evaluate the model by the scoring engine
  • data_dev:
    • development dataset, plaintext
  • data_test:
    • testing dataset used by the scoring mechanism, encrypted
  • data_train:
    • train dataset used to train the model
  • libs:
    • Helping functions, e.g. nicer visualization in tensorboard or an example evaluation of the model
  • models:
    • models/model.h5: main model evaluated by the scoring engine and used by the agent
    • .easeml.yml: used by the scoring engine, should remain untouched for this workshop. More info see CI @ Ease.ml
  • wojac_test.ipynb:
    • Test the agent and model without the webapp
  • webpage:
    • webapp and agent code

Sentiments

  • NPC used as no sentiment/default

As per the dataset labels:

  • Other
  • Sad
  • Happy
  • Angry

agent sentiments

Badgen.net

State of the evaluation engine on this repository (needs to be modified to reflect forks)

easemlCI

easemlCI

easemlCI

aiknowthatfeel's People

Contributors

leaguilar avatar easemlbot[bot] 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.