DeepActionPotential commited on
Commit
023f8b8
·
verified ·
1 Parent(s): 0af6a2e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -84
README.md CHANGED
@@ -1,85 +1,98 @@
1
- # AI Text Detector
2
-
3
- A streamlit-based application that helps identify whether text was generated by AI or written by humans. Built using Streamlit and machine learning.
4
-
5
- ## Features
6
-
7
- - Real-time text classification
8
- - Minimum word count validation (100 words)
9
- - User-friendly web interface
10
- - Text preprocessing pipeline
11
- - Clear visual feedback for results
12
-
13
- ## Demo
14
-
15
- The application provides a simple yet powerful interface for checking text. Here's how it works:
16
-
17
- ### 1. Input Text
18
-
19
- ![Input Interface](images/1.png)
20
-
21
- The main interface features a large text area where you can paste or type the text you want to check. The application requires a minimum of 100 words for accurate classification.
22
-
23
- ### 2. Results
24
-
25
- ![Results](images/2.png)
26
-
27
- After submitting the text, the application will process it and display whether it appears to be human-written or AI-generated. The results are shown with clear visual indicators and informative messages.
28
-
29
- ## Setup
30
-
31
- 1. Create and activate a virtual environment:
32
- ```bash
33
- # Create virtual environment
34
- python -m venv venv
35
-
36
- # Activate virtual environment
37
- # Windows
38
- .\venv\Scripts\activate
39
- # Linux/MacOS
40
- source venv/bin/activate
41
- ```
42
-
43
- 2. Install the required dependencies:
44
- ```bash
45
- pip install -r requirements.txt
46
- ```
47
-
48
- 3. Run the application:
49
- ```bash
50
- python run.py
51
- ```
52
-
53
- 4. Open your web browser and navigate to `http://localhost:8501`
54
-
55
- ## Technical Details
56
-
57
- The application uses a machine learning model trained to distinguish between AI-generated and human-written text. The preprocessing pipeline includes:
58
- - Lowercasing
59
- - Punctuation removal
60
- - Stopword removal
61
- - URL and email removal
62
- - Number removal
63
- - Non-printable character removal
64
-
65
- ## Model Training
66
-
67
- The machine learning model used in this application was trained using the Jupyter notebook [generated-text-classification.ipynb](generated-text-classification.ipynb).
68
-
69
- The trained model is saved as `models/best_model.joblib` and is loaded automatically when the application starts.
70
-
71
- The model achieves 100% accuracy and an F1-score of 100, but its performance is constrained to data similar to what is presented in the training dataset. Therefore, it struggles to generalize across diverse data types. Nonetheless, it performs exceptionally well in distinguishing between AI-generated and human-generated text.
72
-
73
- ## Requirements
74
-
75
- - Python 3.8+
76
- - pip
77
- - All dependencies listed in [requirements.txt](requirements.txt)
78
-
79
- ## Contributing
80
-
81
- Contributions are welcome! Please feel free to submit a Pull Request.
82
-
83
- ## License
84
-
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  This project is licensed under the MIT License - see the LICENSE file for details.
 
1
+ ---
2
+ title: AI Text Detector
3
+ emoji: 🤖
4
+ colorFrom: indigo
5
+ colorTo: blue
6
+ sdk: streamlit
7
+ sdk_version: 1.30.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
+
13
+
14
+ # AI Text Detector
15
+
16
+ A streamlit-based application that helps identify whether text was generated by AI or written by humans. Built using Streamlit and machine learning.
17
+
18
+ ## Features
19
+
20
+ - Real-time text classification
21
+ - Minimum word count validation (100 words)
22
+ - User-friendly web interface
23
+ - Text preprocessing pipeline
24
+ - Clear visual feedback for results
25
+
26
+ ## Demo
27
+
28
+ The application provides a simple yet powerful interface for checking text. Here's how it works:
29
+
30
+ ### 1. Input Text
31
+
32
+ ![Input Interface](images/1.png)
33
+
34
+ The main interface features a large text area where you can paste or type the text you want to check. The application requires a minimum of 100 words for accurate classification.
35
+
36
+ ### 2. Results
37
+
38
+ ![Results](images/2.png)
39
+
40
+ After submitting the text, the application will process it and display whether it appears to be human-written or AI-generated. The results are shown with clear visual indicators and informative messages.
41
+
42
+ ## Setup
43
+
44
+ 1. Create and activate a virtual environment:
45
+ ```bash
46
+ # Create virtual environment
47
+ python -m venv venv
48
+
49
+ # Activate virtual environment
50
+ # Windows
51
+ .\venv\Scripts\activate
52
+ # Linux/MacOS
53
+ source venv/bin/activate
54
+ ```
55
+
56
+ 2. Install the required dependencies:
57
+ ```bash
58
+ pip install -r requirements.txt
59
+ ```
60
+
61
+ 3. Run the application:
62
+ ```bash
63
+ python run.py
64
+ ```
65
+
66
+ 4. Open your web browser and navigate to `http://localhost:8501`
67
+
68
+ ## Technical Details
69
+
70
+ The application uses a machine learning model trained to distinguish between AI-generated and human-written text. The preprocessing pipeline includes:
71
+ - Lowercasing
72
+ - Punctuation removal
73
+ - Stopword removal
74
+ - URL and email removal
75
+ - Number removal
76
+ - Non-printable character removal
77
+
78
+ ## Model Training
79
+
80
+ The machine learning model used in this application was trained using the Jupyter notebook [generated-text-classification.ipynb](generated-text-classification.ipynb).
81
+
82
+ The trained model is saved as `models/best_model.joblib` and is loaded automatically when the application starts.
83
+
84
+ The model achieves 100% accuracy and an F1-score of 100, but its performance is constrained to data similar to what is presented in the training dataset. Therefore, it struggles to generalize across diverse data types. Nonetheless, it performs exceptionally well in distinguishing between AI-generated and human-generated text.
85
+
86
+ ## Requirements
87
+
88
+ - Python 3.8+
89
+ - pip
90
+ - All dependencies listed in [requirements.txt](requirements.txt)
91
+
92
+ ## Contributing
93
+
94
+ Contributions are welcome! Please feel free to submit a Pull Request.
95
+
96
+ ## License
97
+
98
  This project is licensed under the MIT License - see the LICENSE file for details.