Spaces:
Sleeping
Sleeping
| 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* |