doi:10.57967/hf/2162 region:us
# LUNA-ProACT - PROtective Analysis for Cyber Threats

LUNA-ProACT is a context-aware machine learning model designed to protect users from online threats, primarily focusing on cybergrooming. It is created to work in association with LUNA, an AI-powered cybergrooming prevention application.

LUNA-ProACT uses natural language processing (NLP) to analyze language use in real-time and detects unusual patterns that could indicate potential online threats. It operates locally on iOS and Android mobile devices using TensorFlow Lite, providing real-time protection without requiring network traffic.

This model results from a collective effort during the TRUE CRIME HACKATHON 2023. Special thanks go to the Polizei Niedersachsen for inspiring the LUNA Cybergrooming Prevention App idea.

## Key Features

- **Real-Time Analysis:** LUNA-ProACT scans text input on the fly, examining for patterns and language use typically associated with cyber threats.
- **Context Awareness:** Recognizes cultural, geographical, and age-specific contexts for accurate and relevant threat detection.
- **Local Processing:** Employs TensorFlow Lite to analyze data directly on the user's device, ensuring maximum privacy.

## Dependencies

- Python 3.7+
- TensorFlow 2.5.0
- HuggingFace Transformers

## Usage

1. **Installation:** Import the LUNA-ProACT model into your Python project.

```python
from transformers import AutoTokenizer, TFAutoModel
tokenizer = AutoTokenizer.from_pretrained("LUNA-ProACT")
model = TFAutoModel.from_pretrained("LUNA-ProACT")
```

2. **Inference:** Use the model for threat detection.

```python
input_text = "Your text here..."
inputs = tokenizer.encode(input_text, return_tensors='tf')
outputs = model(inputs)[0]

# Outputs return the likelihood of the text being a potential cyber threat.
threat_probability = tf.sigmoid(outputs)

if threat_probability > 0.5:
    print("Potential cyber threat detected!")
```

## About Us

LUNA-ProACT has been released by **Phichayut 'Florentin' Sakwiset** from WE-MAKE.IO, with contributions from **Leon Lukaszewski**, **Lisa Adolf** & **Klemens Karboswki**.

## License

LUNA-ProACT is the property of the Polizei Niedersachsen. It is licensed under the GNU Affero General Public License (AGPL) Version 3 and is available for non-commercial use as an open-source project. 

Please see the [LICENSE (TBA)](LICENSE) file for more details.

## Contribution

We welcome contributions to help improve LUNA-ProACT. If you have any issues or feature requests, please open a new issue or pull request. 

Remember to follow our [contribution guidelines](https://huggingface.co/WE-MAKE-IO/LUNA-ProACT/blob/main/CONTRIBUTING.md) to ensure a smooth collaboration process. Thank you for your interest in contributing to LUNA-ProACT. 

## Contact Us

For any further information or inquiries, please reach us at [hey@we-make.io](mailto:hey@we-make.io).
[![Contact](https://img.shields.io/badge/contact-WE--MAKE.IO-blue)](mailto:hey@we-make.io)


---

### 💙 Thanks to the Polizei Niedersachsen

*We appreciate the platform provided by Polizei Niedersachsen through the TRUE CRIME HACKATHON 2023, which played a crucial role in the inception and development of LUNA-ProACT.
Let's work together to make our digital world safer.*