Giter Site home page Giter Site logo

nlpbot's Introduction

Simple telegram chatbot

Start bot

  1. create file bot_token in project /root directory, generate bot_token fill file bot_token as an example
API_TOKEN = "YOUR_BOT_TOKEN"
  1. Run flask_run.sh. It will start flask server on port 6969
  2. Run main.py

flask_run.sh output with generated params

===> Text input: |0|1|Любишь путешествовать?|1|2|
127.0.0.1 - - [13/May/2022 14:55:28] "POST /get_answer HTTP/1.1" 200 -

===> Params generate: {'max_length': 256, 'no_repeat_ngram_size': 3, 'do_sample': True, 'top_k': 100, 'top_p': 0.9, 'temperature': 0.6, 'num_return_sequences': 1, 'device': 'cpu', 'is_always_use_length': True, 'length_generate': '-'}
===> Text input: |0|1|Какой город запомнился больше всего?|1|-|
127.0.0.1 - - [13/May/2022 14:55:50] "POST /get_answer HTTP/1.1" 200 -

===> Params generate: {'max_length': 256, 'no_repeat_ngram_size': 3, 'do_sample': True, 'top_k': 100, 'top_p': 0.9, 'temperature': 0.6, 'num_return_sequences': 1, 'device': 'cpu', 'is_always_use_length': True, 'length_generate': '2'}

main.py output will show all user's dialog

(including questions-input and answers-output)

==> Text input: Расскажи о себе
==> Text output: Живу в Германии.
==> Text input: Любишь путешествовать?
==> Text output: Нет, просто хочется посмотреть мир, побывать в разных странах, пожить в разных городах.
==> Text input: Какой город запомнился больше всего?
==> Text output: Днепропетровск
==> Text input: И что же в нем удивило больше всего?
==> Text output: Подумал, что это какой-то китайский аналог нашего "Ералаша".

nlpbot's People

Contributors

dependabot[bot] avatar freefly-girl avatar

Watchers

 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.