Coder Social home page Coder Social logo

moodbot's Introduction

MoodBot

一個基於Naive Bayes classifier的文字情緒辨識LINE機器人,高中二年級時的自主學習計畫。

2024年升級linebot至v3,也將回應訊息改為Flex Message美化。

Features

  • 判斷文字情緒
  • 統計YouTube影片的留言評價

Screenshots

intro

review

Tech Stack

Bot: pallets/flask, line/line-bot-sdk-python

AI: fxsjy/jieba, scikit-learn/scikit-learn

Crawler: psf/requests, YouTube Data API v3

Environment Variables

To run this project, you will need to add the following environment variables

KEY="Google Cloud API key for YouTube API"
TOKEN="Channel access token for LINE Messaging API"
SECRET="Channel secret for LINE Messaging API"

Requirements(Tested)

Python: 3.10

flask==3.0.3
jieba==0.42.1
joblib==1.4.0
line-bot-sdk==3.11.0
numpy==1.26.4
pandas==2.2.2
requests==2.31.0
scikit-learn==1.2.2

v3

Python: 3.12.1、3.11.9

flask==3.0.3
jieba==0.42.1
joblib==1.4.2
line-bot-sdk==3.11.0
numpy==2.0.1
requests==2.31.0
scikit-learn==1.5.1

Deploy

LINE Setting

  1. Go to LINE Developers
  2. Create a new "Provider" or click an existing provider
  3. In the "Channels" tab, create a new channel with "Messaging API" type
  4. Fill in the relevant information

Now you can find your Channel secret in the "Basic settings" tab.

In the 'Messaging API' tab, you will find the 'Bot Basic ID' for adding your bot friend later. Then scroll down, modify the 'Webhook URL,' and check the 'Use webhook' option. At the page bottom, issue a 'Channel access token.'

Last of all, disable "Auto Response" at LINE Official Account Manager.

YouTube Data API v3

Omit

Webhook Server

Showcase with cPanel: Chinese

moodbot's People

Contributors

deepsourcebot avatar yappy2000d avatar

Watchers

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