Coder Social home page Coder Social logo

neloy-barman / ipl-chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.09 MB

Home Page: https://huggingface.co/spaces/nelbarman053/IPL-Chat-Buddy

License: MIT License

Python 27.80% Jupyter Notebook 72.20%
chatbot dialogflow faq-chatbot ipl mysql streamlit

ipl-chatbot's Introduction

IPL Buddy

Project Development Journal

Tech stack

Stack Name
Chatbot platform Google Dialogflow Console
Database MySQL
Backend framework FastAPI
Production Database aiven.io
Production server render.com
Integration site Huggingface

Codebase

I handled the backend api calling using fastapi. All the files that are used to prepare and maintain the chatbot can be found here. I'm adding a short description of all the files and folders.

๐Ÿ‘‰ main.py

This is the main .py file from where the backend handling starts.

๐Ÿ‘‰ generic_helpers.py

There are some values, dictionaries and methods that are used in many files. So, all of them are placed here and those are imported from this file.

๐Ÿ‘‰ config.py

As the conversation progresses, some parameters are to be stored, that are needed to fetch final data. These are saved in a dictionary with the session id as the key.

๐Ÿ‘‰ db_helpers

All these *.py files within this folder are used to fetch data from the database server. Different files contain methods that read from the database and returns relatable data needed.
File Name Fetch Handling to database
db_connection Creates and close connection to the database.
dates_db Particular session start date and end date.
match_db toss decision, winning runs, winning wickets, match result type and dls method.
player_of_the_match_db player of the match.
seasons_db available unique sessions.
teams_db both teams, match winner and toss winner teams.
umpires_db first umpire, second umpire and both umpires.
venues_db venues for the particular session and date.

๐Ÿ‘‰ intent_helpers

*.py Files here are used to handling data fetching and generating responses of the chatbot based on particular intent.
File Name Backend handling for intent
date_helper Date
match_info_helper Match Info and Match Info Next.
player_of_the_match_helper Player of the Match.
season_helper Season.
team_info_helper Team Info and Team Info Next.
umpire_info_helper Umire Info and Umpire Info Next.
venues_helper Venue.

๐Ÿ‘‰ requirements.txt

It contains information of all the dependencies with their particular versions installed and used to create and maintain the app.

๐Ÿ‘‰ .gitignore

It has all the file patterns that needs to be ignored while pushing to the github.

Integration

I integrated my chatbot using google dialoglfow messenger api. I created a basic UI just for the sake of chatbot testing and deployed the website in huggingface. You can check it out here. Below the code snippet is given, in case you want to integrate and test: -

<script src="https://www.gstatic.com/dialogflow-console/fast/messenger/bootstrap.js?v=1"></script>
<df-messenger
intent="WELCOME"
chat-title="IPL_BOT"
agent-id="cc8dfc8c-36c0-420e-9c7b-aeb2ba566a1c"
language-code="en"
></df-messenger>

Conversation Flow Diagrams

Team Info

Match Info

Umpire Info

Player of the Match

Conversation snaps

ipl-chatbot's People

Contributors

neloy-barman avatar

Watchers

 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.