https://github.com/toraaglobal/redation-improver-streamlit
Streamlit Application for Text Redaction with Dialect and Tone Selection
https://github.com/toraaglobal/redation-improver-streamlit
langchain langchain-python llm openai python streamlit
Last synced: 4 months ago
JSON representation
Streamlit Application for Text Redaction with Dialect and Tone Selection
- Host: GitHub
- URL: https://github.com/toraaglobal/redation-improver-streamlit
- Owner: toraaglobal
- License: mit
- Created: 2024-08-20T04:57:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-20T07:07:38.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T11:51:36.452Z (over 1 year ago)
- Topics: langchain, langchain-python, llm, openai, python, streamlit
- Language: Python
- Homepage: https://redation-improver-app-toraaglobal.streamlit.app
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Streamlit Application for Text Redaction with Dialect and Tone Selection
***
This Streamlit application leverages the OpenAI language model to redact input text and offers users the ability to select the dialect and tone of the redacted output. It is designed to be user-friendly and highly customizable.
## Features
- Text Redaction: Automatically redact sensitive or unwanted information from input text.
- Dialect Selection: Choose from various dialects to tailor the redacted text to specific audiences.
- Tone Adjustment: Adjust the tone of the text to be formal, informal, or anything in between.
- Real-time Preview: See the redacted text with selected options in real time.
## Getting Started
**Prerequisites**
Before running the application, ensure you have the following installed:
- Python 3.7 or higher
- pip for package management
### Installation
- Clone the repository:
```
git clone https://github.com/your-username/streamlit-redaction-app.git
cd streamlit-redaction-app
```
- Install required packages:
```
pip install -r requirements.txt
```
- Set up OpenAI API key:
- Obtain your API key from OpenAI.
- Set up an environment variable OPENAI_API_KEY:
```
export OPENAI_API_KEY='your-api-key-here'
```
- Running the Application
To start the application, navigate to the project directory and run:
```
streamlit run main.py
```
This command will launch the application in your default web browser.
### Deploying the Application
Streamlit Cloud is a simple and free way to deploy your Streamlit applications. Follow these steps to deploy:
- Sign up or log in to Streamlit Cloud:
- Go to [Streamlit Cloud](https://streamlit.io/) and sign up or log in.
- Create a new app:
- Click on "New app" and connect your GitHub repository containing the Streamlit application.
- Configure your deployment:
- Repository: Select your GitHub repository.
- Branch: Choose the branch you want to deploy (e.g., main).
- File path: Enter the path to your Streamlit app file (e.g., app.py).
- Set environment variables:
- In the "Advanced settings" of your app, add your OpenAI API key as an environment variable:
```
Key: OPENAI_API_KEY
Value: your-api-key-here
```
- Deploy the app:
- Click "Deploy" and Streamlit will handle the rest. Once the deployment is complete, your app will be live and accessible via a unique URL.