Telegram chatbot created with deep learning model (LSTM) and telebot library.

Overview

Telegram chatbot

Telegram chatbot created with deep learning model (LSTM) and telebot library.

forthebadge badge-telegram-program

Description

This program will allow you to create very easily a custom chatbot capable of sending texts, images or videos.
The deep learning model used is a Long Short Term Memory (LSTM) but you can change his structure if you want.

Getting Started

Install the libraries

Execute the following command : pip install -r requirements.txt

Create a bot in telegram

To do that, you have to open your telegram application. Then speak to this user : @BotFather. It is a bot created by telegram itself that allows you to manage the creation and the editing of your bots. Just follow the instructions and get the API token of your bot.
You can follow this tutorial : tutorial

Change the settings

Once you got the api token of your bot, in the my_config.py file change the value of TOKEN.

Last step

Before you can run this program, you will have to complete the most important file : ìntents.json In this file you will have to write all the sentences you would like the chatbot learn.

  • tag : title of the question/answer. It does not matter for the model. This is just for you.
  • type : You have 3 possibilities
    • text : the chatbot will answer only with a text message
    • file : the chatbot will send a text message followed by a document
    • multiple_photos : the chatbot will send text messages with pictures attached.
  • patterns : write all possible turns of phrase for a question
  • responses : write the chatbot's answers. You can write more than one. The chatbot will choose randomly one of them.
  • link : path to your documents and photos

Launch

Execute the following command in a terminal : python main.py

You can now speak to your bot in your telegram application !

You might also like...
Forecasting directional movements of stock prices for intraday trading using LSTM and random forest
Forecasting directional movements of stock prices for intraday trading using LSTM and random forest

Forecasting directional movements of stock-prices for intraday trading using LSTM and random-forest https://arxiv.org/abs/2004.10178 Pushpendu Ghosh,

a reccurrent neural netowrk that when trained on a peice of text and fed a starting prompt will write its on 250 character text using LSTM layers

RNN-Playwrite a reccurrent neural netowrk that when trained on a peice of text and fed a starting prompt will write its on 250 character text using LS

A Simple LSTM-Based Solution for "Heartbeat Signal Classification and Prediction" in Tianchi

LSTM-Time-Series-Prediction A Simple LSTM-Based Solution for "Heartbeat Signal Classification and Prediction" in Tianchi Contest. The Link of the Cont

Politecnico of Turin Thesis: "Implementation and Evaluation of an Educational Chatbot based on NLP Techniques"

THESIS_CAIRONE_FIORENTINO Politecnico of Turin Thesis: "Implementation and Evaluation of an Educational Chatbot based on NLP Techniques" GENERATE TOKE

Image Captioning using CNN ,LSTM and Attention

Image Captioning using CNN ,LSTM and Attention This is a deeplearning model which tries to summarize an image into a text . Installation Install this

😇A pyTorch implementation of the DeepMoji model: state-of-the-art deep learning model for analyzing sentiment, emotion, sarcasm etc

------ Update September 2018 ------ It's been a year since TorchMoji and DeepMoji were released. We're trying to understand how it's being used such t

PyKale is a PyTorch library for multimodal learning and transfer learning as well as deep learning and dimensionality reduction on graphs, images, texts, and videos
PyKale is a PyTorch library for multimodal learning and transfer learning as well as deep learning and dimensionality reduction on graphs, images, texts, and videos

PyKale is a PyTorch library for multimodal learning and transfer learning as well as deep learning and dimensionality reduction on graphs, images, texts, and videos. By adopting a unified pipeline-based API design, PyKale enforces standardization and minimalism, via reusing existing resources, reducing repetitions and redundancy, and recycling learning models across areas.

Using LSTM write Tang poetry
Using LSTM write Tang poetry

本教程将通过一个示例对LSTM进行介绍。通过搭建训练LSTM网络,我们将训练一个模型来生成唐诗。本文将对该实现进行详尽的解释,并阐明此模型的工作方式和原因。并不需要过多专业知识,但是可能需要新手花一些时间来理解的模型训练的实际情况。为了节省时间,请尽量选择GPU进行训练。

OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network
OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network

Stock Price Prediction of Apple Inc. Using Recurrent Neural Network OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network Dataset:

Comments
  • Can u help me

    Can u help me

    File "C:\Users\Christopher\Desktop\python\main.py", line 26, in model, tokenizer, lbl_encoder, stopWords, nlp, data = function_regroup_all() File "C:\Users\Christopher\Desktop\python\main.py", line 17, in function_regroup_all padded_sequences, tokenizer = nlp_pipeline(nlp, stopWords, training_sentences) File "C:\Users\Christopher\Desktop\python\function_utils.py", line 77, in nlp_pipeline with open('model/tokenizer.pickle', 'wb') as handle: FileNotFoundError: [Errno 2] No such file or directory: 'model/tokenizer.pickle'

    I got this error and how to fix this ?

    opened by fxchris8 0
Owner
null
A resource for learning about deep learning techniques from regression to LSTM and Reinforcement Learning using financial data and the fitness functions of algorithmic trading

A tour through tensorflow with financial data I present several models ranging in complexity from simple regression to LSTM and policy networks. The s

null 195 Dec 7, 2022
Deep learning based hand gesture recognition using LSTM and MediaPipie.

Hand Gesture Recognition Deep learning based hand gesture recognition using LSTM and MediaPipie. Demo video using PingPong Robot Files Pretrained mode

Brad 24 Nov 11, 2022
Sign Language is detected in realtime using video sequences. Our approach involves MediaPipe Holistic for keypoints extraction and LSTM Model for prediction.

RealTime Sign Language Detection using Action Recognition Approach Real-Time Sign Language is commonly predicted using models whose architecture consi

Rishikesh S 15 Aug 20, 2022
LSTM and QRNN Language Model Toolkit for PyTorch

LSTM and QRNN Language Model Toolkit This repository contains the code used for two Salesforce Research papers: Regularizing and Optimizing LSTM Langu

Salesforce 1.9k Jan 8, 2023
Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction

Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction Requirements The code has been tested running under Python 3.7.4, with the foll

zshicode 84 Jan 1, 2023
TianyuQi 10 Dec 11, 2022
LSTM model trained on a small dataset of 3000 names written in PyTorch

LSTM model trained on a small dataset of 3000 names. Model generates names from model by selecting one out of top 3 letters suggested by model at a time until an EOS (End Of Sentence) character is not encountered.

Sahil Lamba 1 Dec 20, 2021
A multi-functional library for full-stack Deep Learning. Simplifies Model Building, API development, and Model Deployment.

chitra What is chitra? chitra (चित्र) is a multi-functional library for full-stack Deep Learning. It simplifies Model Building, API development, and M

Aniket Maurya 210 Dec 21, 2022
Incorporating Transformer and LSTM to Kalman Filter with EM algorithm

Deep learning based state estimation: incorporating Transformer and LSTM to Kalman Filter with EM algorithm Overview Kalman Filter requires the true p

zshicode 57 Dec 27, 2022