FrAnKu34t23's picture
Update README.md
f44b222 verified
---
title: Workplace Safety Risk Predictor
emoji: 🚧
colorFrom: yellow
colorTo: red
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
---
# 🚧 Workplace Safety Risk Prediction Model
An AI-powered tool for analyzing workplace scenarios to identify potential hazards, causes of accidents, and injury severity levels.
## 🎯 Features
- **Hazard Identification**: Identifies potential workplace hazards from scenario descriptions
- **Cause Analysis**: Classifies the primary cause of workplace accidents
- **Injury Severity**: Assesses the degree of potential injuries
- **Structured Output**: Provides results in JSON format for easy integration
- **Interactive Interface**: User-friendly Gradio web interface
## πŸ”§ Model Details
- **Base Model**: DistilGPT-2
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
- **Training Data**: OSHA workplace accident reports
- **Model Size**: ~82M parameters (base) + 589K LoRA parameters
## πŸ“‹ Output Format
The model generates structured predictions in the following format:
```json
{
"Hazards": ["MECHANICAL POWER PRESS", "AMPUTATION", "FINGER", "GUARD"],
"Cause of Accident": "Caught in or between caused by Catch Point/Puncture Action",
"Degree of Injury": "Medium"
}
```
## πŸš€ Usage
1. Enter a workplace scenario description in the text box
2. Adjust creativity and response length settings if needed
3. Click "Analyze Scenario" to generate predictions
4. View results in the structured output panels
## πŸ’‘ Example Scenarios
- Power press operations with safety hazards
- Falls from ladders or elevated surfaces
- Chemical exposure incidents
- Manual lifting injuries
- Construction site accidents
## ⚠️ Important Notice
This model is designed for **educational and research purposes only**. Always consult qualified safety professionals for real workplace safety assessments and decisions.
## πŸ› οΈ Technical Implementation
- **Framework**: Hugging Face Transformers + PEFT
- **Interface**: Gradio
- **Deployment**: Hugging Face Spaces
- **Training**: Fine-tuned on OSHA incident reports using LoRA
## πŸ“Š Model Performance
The model has been trained to recognize common workplace hazards and provide structured safety assessments based on incident descriptions. Performance may vary depending on scenario complexity and domain specificity.
## 🀝 Contributing
Issues and suggestions are welcome! This model can be further improved with:
- Additional training data
- Domain-specific fine-tuning
- Enhanced post-processing
- Multi-language support
## πŸ“œ License
MIT License - Feel free to use and modify for educational and research purposes.
---
*Built with ❀️ using Hugging Face Transformers and Gradio*