Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.29 KB

README.md

File metadata and controls

52 lines (42 loc) · 1.29 KB

Text detoxification Assignment

Innipolis [F23] PML&DL course


🎓 Student

Name: Karina Denisova
Email: [email protected]
Group numer: BS21-DS-01

🗒 Project description

Project aims to address the challenge of transforming text with toxic style into text with a neutral style while preserving the same underlying meaning.

🤾‍♀️ Run the project

  1. Clone the repository
  2. Install requirements
pip install -r requirements.txt
  1. For dataset creation run:
python src/data/make_dataset.py
  1. For baseline model run:
python src/models/baseline/predict_baseline.py 

4.1) For baseline evaluation run:

python src/metrics/metrics.py --inputs data/interim/translation.txt --preds data/interim/baseline.txt
  1. For training T5-small model run:
python src/models/T5/T5_model_train.py

5.1) For T5-small model evaluation run:

python src/metrics/metrics.py --inputs data/interim/test_translation.txt --preds data/interim/result.txt

5.2) To download T5-small model weights run:

python src/data/load_weights.py

Also you can run all modelt and thesting with examples from the notebooks folder.