Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -9,8 +9,7 @@ license: mit
|
|
9 |
short_description: 'FactChecker: Fake News Detector'
|
10 |
---
|
11 |
|
12 |
-
#
|
13 |
-
|
14 |
|
15 |
FactChecker is a web application that detects fake news using various machine learning models.
|
16 |
The system analyzes text input and predicts whether the content is likely to be real or fake news,
|
@@ -49,16 +48,17 @@ providing confidence scores and visualizations to help users understand the resu
|
|
49 |
- Regular expressions for text cleaning
|
50 |
|
51 |
## Project Structure
|
|
|
52 |
FactChecker/
|
53 |
βββ build/ # React build files(compiled frontend)
|
54 |
β βββ static/
|
55 |
β β βββ css/ # Compiled CSS
|
56 |
β β βββ js/ # Compiled JavaScript
|
57 |
-
β βββ asset-manifest.json
|
58 |
β βββ index.html # Main HTML file
|
59 |
-
β βββ logo.ico
|
60 |
-
β βββ logo.png
|
61 |
-
β βββ manifest.json
|
62 |
βββ model_training/ # Model training materials
|
63 |
β βββ visualizations/ # Generated visualization images
|
64 |
β βββ model_training.ipynb # Jupyter notebook for model training
|
@@ -67,33 +67,35 @@ FactChecker/
|
|
67 |
β βββ lr_model.pkl # Logistic Regression model
|
68 |
β βββ rf_model.pkl # Random Forest model
|
69 |
β βββ distilbert_model.pt # DistilBERT model
|
70 |
-
βββ .gitattributes
|
71 |
βββ Dockerfile # Docker configuration
|
72 |
-
βββ README.md
|
73 |
βββ app.py # Flask application
|
74 |
βββ requirements.txt # Python dependencies
|
|
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
1. Clone the repository
|
80 |
-
2. Create a virtual environment and install the dependencies.
|
81 |
-
|
82 |
-
3. Download NLTK resources:
|
83 |
-
|
84 |
-
4. Run the application
|
85 |
-
|
86 |
|
87 |
#### For Frontend:
|
88 |
-
1. Install dependencies:
|
89 |
-
|
90 |
-
3. Build the frontend:
|
91 |
-
|
92 |
|
93 |
#### Model Training
|
94 |
To retrain the models:
|
95 |
1. Upload the notebook in Google Colab.
|
96 |
2. Download the ISOT(true.csv, fake.csv) datasets and upload it to the google drive.
|
97 |
-
3.
|
98 |
-
|
99 |
-
|
|
|
|
9 |
short_description: 'FactChecker: Fake News Detector'
|
10 |
---
|
11 |
|
12 |
+
#  FactChecker: Fake News Detection Web Application
|
|
|
13 |
|
14 |
FactChecker is a web application that detects fake news using various machine learning models.
|
15 |
The system analyzes text input and predicts whether the content is likely to be real or fake news,
|
|
|
48 |
- Regular expressions for text cleaning
|
49 |
|
50 |
## Project Structure
|
51 |
+
```
|
52 |
FactChecker/
|
53 |
βββ build/ # React build files(compiled frontend)
|
54 |
β βββ static/
|
55 |
β β βββ css/ # Compiled CSS
|
56 |
β β βββ js/ # Compiled JavaScript
|
57 |
+
β βββ asset-manifest.json
|
58 |
β βββ index.html # Main HTML file
|
59 |
+
β βββ logo.ico
|
60 |
+
β βββ logo.png
|
61 |
+
β βββ manifest.json
|
62 |
βββ model_training/ # Model training materials
|
63 |
β βββ visualizations/ # Generated visualization images
|
64 |
β βββ model_training.ipynb # Jupyter notebook for model training
|
|
|
67 |
β βββ lr_model.pkl # Logistic Regression model
|
68 |
β βββ rf_model.pkl # Random Forest model
|
69 |
β βββ distilbert_model.pt # DistilBERT model
|
70 |
+
βββ .gitattributes
|
71 |
βββ Dockerfile # Docker configuration
|
72 |
+
βββ README.md
|
73 |
βββ app.py # Flask application
|
74 |
βββ requirements.txt # Python dependencies
|
75 |
+
```
|
76 |
|
77 |
+
## Steps
|
78 |
|
79 |
+
### For Backend:
|
80 |
1. Clone the repository
|
81 |
+
2. Create a virtual environment and install the dependencies.
|
82 |
+
```pip install -r requirements.txt```
|
83 |
+
3. Download NLTK resources:
|
84 |
+
```python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"```
|
85 |
+
4. Run the application
|
86 |
+
```python app.py```
|
87 |
|
88 |
#### For Frontend:
|
89 |
+
1. Install dependencies:
|
90 |
+
```npm install ```
|
91 |
+
3. Build the frontend:
|
92 |
+
```npm run build```
|
93 |
|
94 |
#### Model Training
|
95 |
To retrain the models:
|
96 |
1. Upload the notebook in Google Colab.
|
97 |
2. Download the ISOT(true.csv, fake.csv) datasets and upload it to the google drive.
|
98 |
+
3. Set runtime type to GPU for optimal performance:
|
99 |
+
```Go to Runtime β Change runtime type β GPU β Save```
|
100 |
+
4. Activate the runtime.
|
101 |
+
5. Execute the notebook cells sequentially to retrain the models.
|