Please note we do not officially support Windows or MacOS, but we do provide some instructions for those who want to use it on these platforms.
You do not explicitly need a conda environment for the bot to run. But it is always recommended nontheless, especially because the next LTS of Ubuntu won't let users pip-install anything without a virtual environment. At the time of writing, this app python >= 3.10
to run.
First, install the dependencies :
sudo apt-get update
sudo apt-get install libgtk-3-0
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
Then clone the repository and cd into it :
# Clones the repository
git clone git@github.com:ThomasByr/chat-bot.git
cd chat-bot
You can create and activate a conda environment with the following commands (make sure to give it a name in environment.yml) :
# Creates environment and install dependencies
conda env create -f environment.yml -y
conda activate sda
Finally, run the app in the background with nohup
and tee
:
# Runs the app in the background
nohup python main.py 2>&1 | tee -a .log &
or in the foreground :
# Runs the app (lets you Ctrl+C to stop it)
python main.py
Simply sign-in or sign-up to the app, and you will be able to chat with the bot and even chat with other users connected to the same server ! The bellow screenshots are from the desktop version, with WSL2 and Ubuntu 22.04.
Sign In | Sign Up | Home Page |
---|---|---|
Build the app for your platform with :
# pip install pyinstaller
flet pack main.py --add-data "assets:assets" --name chat-bot
The simple cli allows you to do 3 simple things :
argument | hint | default |
---|---|---|
--help |
show help message and exit | |
--version |
show program's version | |
run [-d|r] |
run the app | release |
do pre |
(re)run the pre-training | |
do scrap [-o] |
(re)run the web scraper | assets/data.json |
If you ever want to contribute, either request the contributor status, or, more manually, fork the repo and make a pull request !
We are using black to format the code, so make sure you have it installed and run :
black src
The standard procedure is :
fork -> git branch -> push -> pull requestNote that we won't accept any PR :
- that does not follow our Contributing Guidelines
- that is not sufficiently commented or isn't well formated
- without any proper test suite
- with a failing or incomplete test suite
Happy coding ! 🙂
This repository is an app and might be exported as a standalone binary. Working source code is licensed under AGPL, the text assets are unlicensed, images and logos have their own section. The following license only applies to the template itself and is not legal advice. The license of this repo does not apply to the resources used in it. Please check the license of each resource before using them.
This project is licensed under the AGPL-3.0 new or revised license. Please read the LICENSE file. Additionally :
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the chat-bot authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
chat-bot - Chat Bot and Web Scraper
Copyright (C) 2023 Thomas BOUYER, Louise COUTURE & Bastian NADLER
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Please read the changelog file for the full history !
alpha (click here to expand)
v0.1 first public release
- create home page with flet (flutter)
- signin and signup pages, local user database with YAML and md5
- first model striped and finetuned from camembert-base
v0.2 model
- changed model to camembert-base
- the model now outputs heatmaps
- data loader can now "slide" context windows
- added new data thanks to @LouiseCouture
- the model now complains if no GPU is connected
TODO (first implementation version)
- add a "forgot password", "change password" and "delete account" feature
- initial message when the user first connects
- use custom data
- typing indicator for the bot
Known Bugs (latest fix)
- fix the bug where the context window of the data loader cuts in the middle of a line
Unless otherwise stated, all icons and logos are made by the author. Copyright (C) 2023 Thomas BOUYER, all rights reserved.
Tools used :