Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jazbengu/ThreatDetect/llms.txt

Use this file to discover all available pages before exploring further.

This guide covers everything you need to get ThreatDetect installed and ready to run. You will clone the repository, install all Python dependencies from requirements.txt, confirm the pre-trained model file is present, and start the Streamlit app.

Prerequisites

Before you begin, make sure your machine meets the following requirements:
  • Python 3.8 or later — ThreatDetect uses features and library versions that require Python 3.8+. Check your version with:
    python --version
    
  • pip — The Python package installer. It is included with most Python distributions. Confirm it is available with:
    pip --version
    

Installation steps

1

Clone the repository

Download the ThreatDetect source code from GitHub:
git clone https://github.com/jazbengu/ThreatDetect.git
cd ThreatDetect
All subsequent commands in this guide assume you are in the ThreatDetect directory.
2

Install Python dependencies

Install all required packages with a single command:
pip install -r requirements.txt
The requirements.txt file includes the following packages:
streamlit
numpy
pandas
scikit-learn
matplotlib
seaborn
plotly
xgboost
shap
PackagePurpose
streamlitWeb UI framework
numpy / pandasNumerical computation and data handling
scikit-learnIsolation Forest, preprocessing, and metrics
matplotlib / seaborn / plotlyVisualization
xgboostGradient-boosted classifier
shapModel explainability
If you are working inside a virtual environment (recommended), activate it before running pip install.
3

Verify the model file

ThreatDetect loads a pre-trained model on startup. Confirm the file exists at the expected path:
ls AI_Model_Code/insider_threat_model.pkl
You should see the file listed. If it is missing, check that you cloned the full repository and that Git LFS (if used) has downloaded large files.
The pre-trained model file AI_Model_Code/insider_threat_model.pkl is required. ThreatDetect will fail to load without it. Do not rename or move this file relative to the repository root.
4

Launch the app

Start ThreatDetect with Streamlit:
streamlit run streamlit_app.py
Streamlit will print a local URL (typically http://localhost:8501) and open it in your default browser. You are ready to use ThreatDetect.

Launching the app on subsequent runs

Once the dependencies are installed, you only need one command to start ThreatDetect:
streamlit run streamlit_app.py
Run this from the ThreatDetect directory each time you want to use the app.

Build docs developers (and LLMs) love