Giter Club home page Giter Club logo

bargainingbot's Introduction

BargainingBot

A Bot that bargains for the price of drinks with customers.

The Bargaining Bot was my final year engineering project. The front end is an Android App and the back end consists of the Natural Language Processing (NLP) platform - Dialogflow, a machine learning Tensorflow model, and couple of Cloud Functions, along with some Google Cloud Platform (GCP) services to make all the different elements work together. Login and Database is handled by Firebase.

What I learned :

  • Android:
    • Developing a reactive android app with the Model-View-ViewModel (MVVM) architecture pattern.
    • Using dependency injection with kodein.
    • Using the observable patterns with LiveData and ViewModel.
    • Using Sq-lite local database with the Room Persistence Library
  • Tensorflow:
    • Building a basic Linear Regression model.
    • Serving the model on GCP ML Engine.
  • Cloud Functions:
    • Building a serverless single purpose function with TypeScript.
    • Working with JSON.
  • Firebase:
    • Implementing Google and Facebook login in android with Firebase Authentication.
    • Using & modelling a No-SQL database with Cloud Firestore.

Following are the links to repositories of different elements of the system:

System Architecture

Try it for yourself:

If you want to try it out you will need a Dialogflow account, a Google Cloud Platform (GCP) account, and a Firebase account. Firebase and Dialogflow both work on GCP itself so make sure Firebase, Dialogflow and GCP are all working on the same project.

  1. Use this dialogflow template. It has all the necessary intents, actions and parameters setup. You can upload this zip to dialogflow and then customize it to your liking.

  2. Next setup the webhook on Firebase Cloud Functions. Add the url of the function to the dialogflow webhook section.

  3. Build your Tensorflow Model and upload the exported file to Cloud ML Engine on GCP. You will need to link to this model in the weebhook.

  4. Create the Cloud Firestore database on Firebase and setup as shown in the images : 1, 2. The collections that are not explored in the images are blank collections for now that will be filled by the android app.

  5. Next create a Cloud Pub/Sub topic on GCP. Add your topic name to the code in the next step.

  6. Create another cloud function in similar way to the previous one from this repo.

  7. Clone the Android App and follow the mentioned steps to link it to the firebase project.

Resources I used:

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.