Coder Social home page Coder Social logo

luci's Introduction

Project icon

LUCI

Logical Unit for Communicational Interactivity

Version badge Docs Link test badge

LUCI is a conversational tamabotchi for discord.

Developers

Cloning and executing

Linux Badge Apple badge

Local machine

Clone this project and engage a python3 virtual environment the way as you like and install the requirements through Makefile.

Example using virtualevwrapper:

$ git clone https://github.com/brunolcarli/Luci.git
$ cd luci/
$ mkvirtualenv Luci
$ (Luci) make install

Create a .env file and add the following content:

TOKEN=<your_test_bot_token>
LISA_URL=<lisa_url>
BACKEND_URL=None
SETTINGS_MODULE=development
REDIS_HOST=<redis_server_host>
REDIS_PORT=<redis_server_port>

You should configure your own environment cloning both lisa and bot api:

  • LISA_URl is required since the bot requests text offense and sentiment to the service API.

  • BACKEND_URL is the long range memory storage (AKA database) which is a separated service.

  • REDIS_HOST and REDIS_PORT is the short term memory, and it depends on a redis-server.

Note: If SETTINGS_MODULE=production the bot will run on a flask server instance.

Execute the bot:

$ (Luci) make run

Training Models

The bot is trained over a serie of .json datasets on core/training/json/intentions/.

For each intention directory there are located a serie of dataset_x.json where x is a sequence number of the train dataset. You can create a new one containing the text and training target label on the following shape:

[
    {"text": "An example text.", "intention": 1},
    {"text": "Another example text.", "intention": 1},
    {"text": "Way othe example text.", "intention": 2},
    {"text": "keep going.", "intention": 2}
]

The training data must respect the intention archicture proposed on the docs, otherwise it may cause the model to behave unproperly.

Train data through Makefile:

$ (Luci) make train

You can view some models score and the number o sample data used for each intention through a cvross validation test:

$ (Luci) make no_free_lunch

Test the bot

The goal is give the models enough data to pass the test when executing:

$ (Luci) make test

Docker

Project icon

Set up the .env file as described above and build the container with docker-compose:

$ docker-compose build

Run with:

$ docker-compose up

Or run in background

$ docker-compose up -d

luci's People

Contributors

brunolcarli avatar mdxv 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.