Skip to content
This repository has been archived by the owner on Jul 17, 2021. It is now read-only.
/ BargainingBot Public archive

My BE final year project. A Bot that bargains for the price of drinks with customers.

Notifications You must be signed in to change notification settings

shounakmulay/BargainingBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: