This web application provides a user interface for uploading Excel files, identifying columns based on user descriptions, and replacing text patterns using regular expressions. The application leverages an LLM (Language Model) for natural language processing tasks, including generating regex patterns and identifying relevant columns for modification.
- File Upload: Upload Excel files (.xlsx) for processing.
- Data Display: View the first five rows of the uploaded data in a tabular format.
- Natural Language Processing: Input descriptions to generate regex patterns and identify columns for modification using an LLM.
- Text Replacement: Replace matched patterns in the specified column with a provided replacement value.
- Backend: Django with required dependencies
- Frontend: React with Material-UI for UI components
- OpenAI API Key: Required for LLM processing
-
Clone the Repository:
git clone https://github.com/Lord-Fifth/bleach-extractor/ cd regex_app -
Set up a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Set OpenAI API Key: Set the OpenAI API key in the environment variable
OPENAI_API_KEY. -
Run Django Migrations:
python manage.py migrate
-
Start the Backend Server:
python manage.py runserver
-
Navigate to the Frontend Directory:
cd regex-frontend -
Install Dependencies:
npm install
-
Start the Frontend Server:
npm start
-
Upload an Excel File:
- Click on "Choose File" to select an Excel file (.xlsx).
- Click "Upload" to process the file. The first five rows will be displayed.
-
Enter Text for LLM Processing:
- Enter a description in the text box. For example, "Find email addresses in the Email column and replace them with 'REDACTED'."
-
Submit Text and Process:
- Click "Submit Text and Process" to generate a regex pattern, identify the column for modification, and replace the matched patterns with the provided replacement value.
This project is licensed under the MIT License.