File size: 1,849 Bytes
c242e22
 
 
b83b2ed
c242e22
b83b2ed
 
 
 
 
 
 
 
 
 
 
 
4a195cb
 
 
b83b2ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a195cb
 
b83b2ed
 
 
c242e22
 
 
 
 
 
b83b2ed
 
 
 
c242e22
b83b2ed
c242e22
b83b2ed
 
 
 
c242e22
 
 
b83b2ed
 
 
c242e22
 
 
b83b2ed
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
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.