Giter Club home page Giter Club logo

me_bot's Introduction

Me_Bot

A simple tool to make a bot that speaks like you, simply learning from your WhatsApp Chats.

Instructions:-

  1. From WhatsApp on your phone, go to any chat and export it by going into the settings. Move the txt file that you receive inside the Me_Bot folder.

  2. Run the clean_whatsapp_chats.py script using the command. Before running, change the names of the people by changing YOUR_NAME and OTHER_NAME in the scripts according to the txt file you have for your chats.

python clean_whatsapp_chats.py whatsapp_chat.txt

  1. Run the prepare_files.ipynb ipython notebook.

  2. Run the Me_Bot.ipynb file and you can play with the bot at the bottom!

NOTE - Actively seeking collaborators for fun side projects like this. If you're itnerested, please drop me a mail at [email protected]

For wechat user:

Wechat chat history is save in SQLite Database, therefore you need to export from you Phone. Basically, if you have a iPhone, there are the steps to get the database file:

  1. Use iTunes to backup your phone (unselect encrypt backup)
  2. Use iTools to open the backup file and get a copy of your database file named MM.sqlite
  3. run python clean_wechat_chats.py YOUR_DATABASE_PATH YOUR_FRIEND_ID

Find more detail information about this here

MM.sqlite

This is the database, each table starts with 'Chat_' corresponding to a chat history with a friend, you need to find the table id you want to generate the chat robot to run the script above. Currently only English chat is supported, Chinese version is under constructing.

me_bot's People

Contributors

diegod94 avatar hlkcrcck avatar spandan-madan avatar wassimseif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

me_bot's Issues

Requeriments

Please give a list of requirements.

I tried installing tensorflow
installing tensorflow hub

nothing works... something related to:
module 'tensorflow' has no attribute 'estimator'

Any one want to add support for messenger chats? Wechat? Telegram?

This is a proof of concept, and help in extending it to other kinds of chat sources would be helpful. If someone can make a PR, I would be more than happy to accept it!

Essentially, you would need to make a clean_messenger_chat.py or clean_wechat_chat.py file to create all the pickle files as are currently created from WhatsApp chats.

Thanks!

Error while running jupiter notebook

Hello Spandan,

I ran the jupyter notebook file (prepare_files.ipynb) from the directory after generating the res directory. For that I used the command:
jupyter-notebook prepare_files.ipynb

Inside the jupyter notebook that opens in my browser the first code block does not run on clicking the play button and is presented by this error:

``ModuleNotFoundError Traceback (most recent call last)
in ()
1 import sys
2 sys.path.append('/usr/local/lib/python3.5/dist-packages/')
----> 3 import tensorflow as tf
4 import tensorflow_hub as hub
5 import numpy as np

ModuleNotFoundError: No module named 'tensorflow'
``

Could you help with the error? I thought that all dependencies are included in the repository. Apparently, it looks like tensorflow is absent, or is there any other issue in the code?

Thank you for the help!

TypeError: 'encoding' is an invalid keyword argument for this function

Hey Spandan,

I cloned your repository on my system (macOS version: 10.14.1). I followed the instructions as per your README.md. After exporting the chat transcript I placed it inside the directory and then ran the python command that was mentioned on the README.

However, I get this error:

  File "clean_whatsapp_chats.py", line 7, in <module>
    f = open(chat_file,'r', encoding="utf8")
TypeError: 'encoding' is an invalid keyword argument for this function

I solved this problem by running python3 command. I just wanted to inform that the python script does not run with the native python command on macOS terminal.

Also, is it supposed to generate a directory named: res

inconsistency between cleaning and prep_files

The clean scripts seems to write the following files in /res:

  • dilogues.p
  • your_sents.p
  • other_sents.p

While prep_files expects to read the following:

  • other_sents.p
  • your_embeddings.p
  • dilogues.p
  • your_sents.p
  • key_embeddings.p

This obviously fails.

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.