Loading repository data…
Loading repository data…
shamspias / repository
This repository contains a WhatsApp chatbot built with Flask and powered by OpenAI's GPT-3 and DALL-E-2 language models. The chatbot is able to understand and respond to natural language queries and provide helpful information. The chatbot can help in many area like customer service, providing news and answering frequently asked questions.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Rename example-docker-compose.yml to docker-compose.yml
Flask, Celery, Flower and Redis services with Docker docker-compose.yml file split into the following services
python -m venv venvvenv/Scripts/activatepython3 -m venv venvvenv/bin/activatepip install -r requirements.txtpython app.pysudo nano /etc/systemd/system/deadlyai.service[Unit]
Description=Gunicorn instance to serve whatsapp chatbot script
After=network.target
[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/deadlyAIchatbot
Environment="PATH=/home/ubuntu/deadlyAIchatbot/venv/bin"
ExecStart=/home/ubuntu/deadlyAIchatbot/venv/bin/gunicorn --workers 3 --bind unix:deadlyai.sock -m 007 wsgi:app
[Install]
WantedBy=multi-user.target
sudo systemctl start deadlyai && sudo systemctl enable deadlyaisudo nano /etc/nginx/sites-available/deadlyai and add the code
server {
listen 80;
server_name chatbot.deadlyai.com www.chatbot.deadlyai.com;
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/deadlyAIchatbot/deadlyai.sock;
}
}
sudo ln -s /etc/nginx/sites-available/deadlyai /etc/nginx/sites-enabledWith Docker
version: '3.8'
services:
redis:
image: 'redis:5.0.5'
command: redis-server --requirepass devpassword
volumes:
- 'redis:/var/lib/redis/data'
ports:
- '6379:6379'
website:
build: .
command: >
gunicorn -b 0.0.0.0:8000
--access-logfile -
--reload
"src.app:flask_app"
env_file:
- '.env'
volumes:
- '.:/deadlyai'
ports:
- '8000:8000'
celery:
build: .
command: celery -A wsgi_app.celery worker --loglevel=info --pool=solo
env_file:
- '.env'
volumes:
- '.:/deadlyai'
flower:
image: mher/flower
environment:
- CELERY_BROKER_URL=redis://:devpassword@redis:6379/0
- FLOWER_PORT=5555
ports:
- 5555:5555
volumes:
redis:
COMPOSE_PROJECT_NAME=deadlyai
PYTHONUNBUFFERED=true
docker-compose up --build