superhg2012 / tf_chatbot_lotr

Lord of the rings sentence generator using TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Tensorflow Chatbot Tensorflow Chatbot Demo by @Sirajology on Youtube

Overview

This is the full code for 'How to Make an Amazing Tensorflow Chatbot Easily' by @Sirajology on Youtube. In this demo code, we implement Tensorflows Sequence to Sequence model to train a chatbot on the Cornell Movie Dialogue dataset. After training for a few hours, the bot is able to hold a fun conversation.

Dependencies

Use pip to install any missing dependencies

Usage

Simply run 'python3 main.py' and your sentences are on the way!

Challenge

The challenge for this video is write an entirely different script using TF Learn to generate Lord of the Ring style sentences. Check out this very similar example, it uses TF Learn to generate Shakespeare-style sentences. Train your model on Lord of the rings text to do something similar! And play around with the hyperparameters to get a more accurate result. Post your GitHub link in the video comments and I'll judge it!

Result

The sentences generated weren't very.. Hmm how do you say it? Intelligent? I've listed some below and you probably agree with me. To be honest I didn't expect much of it, but it was fun transforming the code into something that works with other data as well.

Example of output:

about it and the heavy she beukais 'geiloau th lo tees h rfe ouod anherh Bis wg deeatas!er Taat Cn miiand wheut cpenoryem, fanat mesres owea isrighe wise t ts ore v ratm ta wd iaudlerrd teek fr ohe ntodd ton Eomeedeiawod nh rd.s te bsel pouboniat.ek Wede rh on oe de h toes we ouopiueuteeo ih aandee nme .e ̂e nh sorar DneoWed noord qkeacm? fas rw'khe n -asor nh gw Gfes Ch nonD roih la fhen bh ileimrn rhot lhide Tol gt wamig thiw weurederolr rodeuner uy s gise nor yl w daeteemgadeav har rh w S th faaf ahed rger any.ed ds vit aaorahraseo-r naud hoewi'np lt n uwr nti riade di tkd! te usid ihe,e bg fh ca oag wd ahosola

For all you non-lotr fans out there. These generated sentences are actually Gandalfish (which is a real language). Check out this video for a quick introduction to Gandalfish!

P.S. the entire list of sentences is in the 'the_awesome_lotr_sentences_file.txt' file!

Credits

Credit for the vast majority of code here goes to suriyadeepan. I've merely created a wrapper to get people started.

Credits for being awesome go to @Sirajology for enabling us to learn so much about ML!

About

Lord of the rings sentence generator using TensorFlow


Languages

Language:Python 100.0%