Add license information and readme.
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
parent
b7a20686e9
commit
2babf45aa6
16
LICENSE.md
Normal file
16
LICENSE.md
Normal file
@ -0,0 +1,16 @@
|
||||
UwU Classifier - Detect annoying messages.
|
||||
Copyright (C) 2023 Slendi
|
||||
|
||||
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/>.
|
||||
|
45
README.md
Normal file
45
README.md
Normal file
@ -0,0 +1,45 @@
|
||||
UwU Classifier
|
||||
==============
|
||||
|
||||
Are you annoyed at Discord people "uwuifying" their messages? Well this model
|
||||
is just for you! You can put it in any bot or any other application that
|
||||
requires it to eliminate this annoyance.
|
||||
|
||||
Creating the dataset
|
||||
--------------------
|
||||
|
||||
You require a couple of things for this:
|
||||
|
||||
- Python's request module
|
||||
- An internet connection
|
||||
- The `uwuify` tool (the one written in Rust, you'll find it)
|
||||
|
||||
The dataset is a modified Topical-Chat one, to get it and then patch it up you
|
||||
just need to do:
|
||||
|
||||
```
|
||||
$ ./create_dataset.sh
|
||||
```
|
||||
|
||||
Now you can move on to training.
|
||||
|
||||
Training the model
|
||||
------------------
|
||||
|
||||
As long as you have installed Tensorflow you should be fine. If you get any
|
||||
error messages just Google. Just run this command and be patient:
|
||||
|
||||
```
|
||||
./train.py
|
||||
```
|
||||
|
||||
You should then find a "final_model" in the project's root directory.
|
||||
|
||||
Using the model
|
||||
---------------
|
||||
|
||||
There's an included `interactive.py` file which shows how you can load the model
|
||||
and use it to get a result out of it. It is an infinite loop that keeps reading
|
||||
lines, if they are "uwuified", then it will be closer to 1, and if not it will
|
||||
be closer to 0.
|
||||
|
@ -9,8 +9,6 @@ rm -f messages.txt messages_to_be_uwuified.txt
|
||||
|
||||
rm -rf dataset
|
||||
mkdir -p dataset/{normal,uwu}
|
||||
#mv messages_good.txt dataset/normal/normal_text_1.txt
|
||||
#mv messages_uwuified.txt dataset/uwu/uwu_text_1.txt
|
||||
|
||||
set +x
|
||||
python3 split_file.py messages_good.txt dataset/normal $(nproc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user