--- title: Text Style Transfer emoji: 📕 🔀 📘 colorFrom: blue colorTo: green sdk: streamlit sdk_version: 1.10.0 python_version: 3.9.7 app_file: apps/app.py models: [ "sentence-transformers/all-MiniLM-L6-v2", "cffl/bert-base-styleclassification-subjective-neutral", "cffl/bart-base-styletransfer-subjective-to-neutral", "cointegrated/roberta-base-formality", "prithivida/informal_to_formal_styletransfer", ] pinned: true license: apache-2.0 --- # Exploring Intelligent Writing Assistance A demonstration of how the NLP task of _text style transfer_ can be applied to enhance the human writing experience using [HuggingFace Transformers](https://huggingface.co/) and [Streamlit](https://streamlit.io/). ![](static/images/app_screenshot.png) > This repo accompanies Cloudera Fast Forward Labs' [blog series](https://blog.fastforwardlabs.com/2022/03/22/an-introduction-to-text-style-transfer.html) in which we explore the task of automatically neutralizing subjectivity bias in free text. The goal of this application is to demonstrate how the NLP task of text style transfer can be applied to enhance the human writing experience. In this sense, we intend to peel back the curtains on how an intelligent writing assistant might function — walking through the logical steps needed to automatically re-style a piece of text (from informal-to-formal **or** subjective-to-neutral) while building up confidence in the model output. Through the application, we emphasize the imperative for a human-in-the-loop user experience when designing natural language generation systems. We believe text style transfer has the potential to empower writers to better express themselves, but not by blindly generating text. Rather, generative models, in conjunction with interpretability methods, should be combined to help writers understand the nuances of linguistic style and suggest stylistic edits that may improve their writing. ## Project Structure ``` . ├── LICENSE ├── README.md ├── apps │ ├── app.py │ ├── app_utils.py │ ├── data_utils.py │ └── visualization_utils.py ├── requirements.txt ├── scripts │ ├── download_models.py │ ├── install_dependencies.py │ └── launch_app.py ├── setup.py ├── src │ ├── __init__.py │ ├── content_preservation.py │ ├── style_classification.py │ ├── style_transfer.py │ └── transformer_interpretability.py ├── static │ └── images └── tests ├── __init__.py └── test_model_classes.py ```