Instructions to use yangwenli661/PMD-model-artifacts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use yangwenli661/PMD-model-artifacts with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://yangwenli661/PMD-model-artifacts") - Notebooks
- Google Colab
- Kaggle
PMD Model Artifacts
Private university-submission repository for Political Misinformation Detection in Somali Text Using Machine Learning.
Source code
The corresponding Flask application is maintained at:
Runtime classifiers
The web application loads eight classifiers:
- Logistic Regression
- Support Vector Machine (SVM)
- Random Forest
- Multinomial Naive Bayes
- BiLSTM
- CNN-BiLSTM
- SomBERTa (runtime directory:
somerta_model) - SomBERTb (runtime directory:
sombertb_model)
The repository also contains the fitted TF-IDF vectorizer and shared Keras tokenizer required for inference.
Label mapping
0: Reliable1: Misinformation2: Misleading
Installation
Authenticate to Hugging Face, then download this repository directly into the web application's ml_models directory:
hf download yangwenli661/PMD-model-artifacts --local-dir ml_models
Python alternative:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="yangwenli661/PMD-model-artifacts",
local_dir="ml_models",
)
For this private repository, the downloader must be authenticated or provide a read token through a secure environment variable. Never commit the token.
Integrity verification
checksums.sha256 records the SHA-256 digest of every uploaded runtime artifact. model_manifest.json records file sizes, paths, label mapping, and source-code location.
Scope and limitations
These files reproduce the models used by the PMD prototype. An AI label and confidence score are not a verified fact-checker decision. Model performance and limitations should be interpreted using the accompanying thesis and evaluation notebook.
- Downloads last month
- 20