This repository contains a LINE Chatbot that interacts with users to predict employee status using a RESTful API. It is similar to the Python-Web-Application-Ensemble_techniques
project but requires integration with a separate bot API. Both projects are deployed on Render.
- Handles user input via LINE messaging.
- Collects necessary data step by step.
- Sends collected data to the prediction API.
- Displays the prediction result to the user.
- Supports quick reply and Flex Messages for better user experience.
bot.py
: The main script handling LINE webhook events and interactions.requirements.txt
: The required dependencies for the bot to function.
- Deploy the RESTful API project on Render: Bot RESTful API
- Deploy this chatbot service on Render: Line Chatbot
- Clone the repository:
git clone https://github.com/your-username/Line-ChatBot.git cd Line-ChatBot
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
export LINE_CHANNEL_ACCESS_TOKEN="your-access-token" export LINE_CHANNEL_SECRET="your-secret" export PREDICTION_API_URL="https://bot-restful-api.onrender.com/predict"
- Run the bot locally:
python bot.py
- Type
Prediction
orทำนาย
to start. - Follow the bot's instructions to input data.
- Confirm or cancel your input.
- Receive the prediction result from the API.
The chatbot requires the following dependencies:
flask
flask-cors
joblib
numpy
gunicorn
line-bot-sdk
This project is licensed under the MIT License.
Author: [email protected] & [email protected]