Use Sentiment Analysis
This guide will help you set up and use Sentiment Analysis by NeurochainAI for monitoring sentiment in Telegram group chats. With this setup, you'll be able to analyze group messages, track sentiment, and collect insights using Docker and Python.
Prerequisites
Before starting, ensure you have the following software installed:
Python 3.10 or higher - Download Python
Docker - Download Docker
Docker Compose - Download Docker Compose
Step 1: Clone the Repository
Begin by cloning the Sentiment Analysis repository and navigating to the project directory:
Install Dependencies
Install the Python dependencies from the requirements file
Configure Environment Variables
Create a `.env` file with the following environment variables:
Setup Docker Compose
Docker Compose sets up both PostgreSQL and the Telegram bot. Use the following command to start the services:
This command will:
Start a PostgreSQL container
Build and run the Telegram bot container
Docker Compose File Structure
The `docker-compose.yml` file defines both PostgreSQL and the bot containers. Below is the structure:
Running the Bot
Once the containers are running, the bot should start interacting with the Telegram API and PostgreSQL. You can monitor logs to check the status:
Stopping the Containers
To stop and remove the containers, use the following command:
Last updated