Giter Site home page Giter Site logo

mitarashidango / markov-bot-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paralleltree/markov-bot-go

0.0 0.0 0.0 61 KB

Mastodonの投稿からマルコフ連鎖で存在しないトゥートを作るやつ

License: MIT License

Go 97.68% Dockerfile 2.32%

markov-bot-go's Introduction

markov-bot-go

An application posting generated text from posts on Mastodon using the Markov chain.

Build and Run locally

$ docker compose build app
$ docker compose run --rm app /app/bot run

Run docker compose run --rm app /app/bot run --help to view help. You can also pass arguments as environment variables.

Configuration

This application requires a configuration file to run. The format of the configuration file is as follows:

input:
  platform: "mastodon"
  origin: ""
  access_token: ""
output:
  platform: "mastodon"
  origin: ""
  access_token: ""
  post_visibility: "unlisted"
fetch_status_count: 100
state_size: 3
min_words_count: 3

See config/bot_config.go for details.

Build as AWS Lambda Function

  1. Create ECR repository to upload container image and make note of the repository url.
  2. Enter to cmd/lambda.
  3. Run sam build to build container image.
  4. Run sam deploy --guided and pass the repository url to create new lambda function.

To use the function, follow steps below:

  • Set event to specify which S3 bucket and key path will be used to place configuration and model file.
    • See PostEvent struct in cmd/lambda/main.go.
  • Put configration file on S3.
    • See ConfigFile struct in config/bot_config.go.

markov-bot-go's People

Contributors

paralleltree 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.