Sep 3, 2020

How to use COBE with Python 3.8

After installing Cobe - see previous post entry

here is an example of what you can do:

$ python3
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cobe.brain
>>> cobe.brain.Brain.init('test.brain')
>>> test=cobe.brain.Brain('test.brain')
>>> test.learn('this is a test!')
>>> print(test.reply('what is this?'))
this is a test!
>>>
 


basically talking with an AI 

...and training this AI while discussing

pretty cool

Sep 2, 2020

Installing Markov COBE on Windows 10

Cobe is a nifty python module Markov chain based text generation library and MegaHAL style chatbot 

the Linux installation is a breeze (easy as pie)

but on Windows 10 it is a bit tricky

Assuming you are using MINGW32 as environment for your python development - here is what needs to be done:

> git clone https://github.com/pteichman/cobe.git
> winpty python setup.py install
> pip install cython
> winpty python -m pip install --upgrade pip
> python -m pip install -U pip setuptools 

from this point all the items needed are installed 

Next step requires the installation of VisualStudio (vs2019 modules) https://visualstudio.microsoft.com)
Once the installer is downloaded use the 2 first options

And after this is done 

go to your cobe installation directory and finalize the install

> winpty python setup.py install

 

 

 

Popular Posts