|
|
--- |
|
|
license: mit |
|
|
--- |
|
|
# π Quote Identifier |
|
|
|
|
|
A program that identifies quotes in text documents using a BERT-based model. π€ |
|
|
|
|
|
## π οΈ Requirements |
|
|
|
|
|
- Python 3.10 π |
|
|
- pip (Python package installer) π¦ |
|
|
|
|
|
## π Installation |
|
|
|
|
|
1. Clone this repository: |
|
|
|
|
|
``` |
|
|
git clone https://huggingface.co/drewThomasson/Quotation_identification_BERT.v1 |
|
|
cd Quotation_identification_BERT.v1 |
|
|
|
|
|
``` |
|
|
|
|
|
2. Install the required packages: |
|
|
|
|
|
``` |
|
|
pip install pandas torch transformers tqdm |
|
|
``` |
|
|
|
|
|
π‘ Note: If you have a CUDA-capable GPU, visit https://pytorch.org for the appropriate PyTorch installation command. |
|
|
|
|
|
## πββοΈ Usage |
|
|
|
|
|
Run the program with: |
|
|
|
|
|
``` |
|
|
python Metal_gui_original_quotation_identification_BERT_infrence.py |
|
|
|
|
|
``` |
|
|
|
|
|
GUI Instructions: |
|
|
1. π Click "Open Text File" to select your text file. |
|
|
2. π Click "Identify Quotes" to process the file. |
|
|
3. π₯οΈ A new window will open showing the text with identified quotes highlighted. |
|
|
|
|
|
## π Included Files |
|
|
|
|
|
- quote_identifier.py: Main Python script π |
|
|
- quotation_identifer_model/: Directory containing the pre-trained model π§ |
|
|
- checkpoint-1000/: Model checkpoint β
|
|
|
- sample_book.txt: Sample text file for testing π |
|
|
|
|
|
## π€ Hugging Face Repository Contents |
|
|
|
|
|
1. Pre-trained quote identification model π§ |
|
|
2. sample_book.txt π |
|
|
3. quote_identifier.py script π |
|
|
4. This README π |
|
|
|
|
|
## π Notes |
|
|
|
|
|
- Ensure the local model directory ./quotation_identifer_model/checkpoint-1000/ is present. |
|
|
- The program creates a BERT_infrence_quote_input.csv file when processing text. |
|
|
- π Use the "Toggle Dark Mode" button to switch between light and dark themes. |
|
|
|
|
|
## π Troubleshooting |
|
|
|
|
|
If you encounter issues: |
|
|
1. π¦ Verify all required packages are correctly installed. |
|
|
2. ποΈ Check that the model directory is present with necessary files. |
|
|
3. π Confirm you're using Python 3.10. |