Downloads · 30 days
0
Sangam530/fake-news-detection-lstm
fake-news-detection-lstm is a text classification model from Sangam530. Use it when you need a label for a piece of text. It is set up for keras. The card lists the license as mit.
This repository contains a deep learning model trained to classify news articles as Fake or Real using an LSTM (Long Short-Term Memory) neural network.
Downloads · 30 days
0
Access
Public
Updated Jun 20, 2025
Repo size
116 MB
Likes
0
Public
Click a slice to open those files.
.h5112 MB · 97%
From the Hugging Face model README
This repository contains a deep learning model trained to classify news articles as Fake or Real using an LSTM (Long Short-Term Memory) neural network.
lstm_model.h5
Trained Keras LSTM model for fake news classification.
tokenizer.pkl
Tokenizer used to preprocess the text data during training.
label_encoder.pkl
Label encoder to transform class labels to numeric form and back.
You can load the model and related files in Python using the Hugging Face Hub as follows:
from huggingface_hub import hf_hub_download
from tensorflow.keras.models import load_model
import pickle
repo_id = "your-username/fake-news-detection-lstm"
# Download files
model_path = hf_hub_download(repo_id=repo_id, filename="lstm_model.h5")
tokenizer_path = hf_hub_download(repo_id=repo_id, filename="tokenizer.pkl")
label_path = hf_hub_download(repo_id=repo_id, filename="label_encoder.pkl")
# Load model and tokenizer
model = load_model(model_path)
with open(tokenizer_path, "rb") as f:
tokenizer = pickle.load(f)
with open(label_path, "rb") as f:
label_encoder = pickle.load(f)