FrAnKu34t23 commited on
Commit
f44b222
Β·
verified Β·
1 Parent(s): 15c35bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +80 -5
README.md CHANGED
@@ -1,12 +1,87 @@
1
  ---
2
- title: ConstructionRiskPredict
3
- emoji: πŸ’¬
4
  colorFrom: yellow
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.0.1
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Workplace Safety Risk Predictor
3
+ emoji: 🚧
4
  colorFrom: yellow
5
+ colorTo: red
6
  sdk: gradio
7
+ sdk_version: 4.0.0
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ # 🚧 Workplace Safety Risk Prediction Model
13
+
14
+ An AI-powered tool for analyzing workplace scenarios to identify potential hazards, causes of accidents, and injury severity levels.
15
+
16
+ ## 🎯 Features
17
+
18
+ - **Hazard Identification**: Identifies potential workplace hazards from scenario descriptions
19
+ - **Cause Analysis**: Classifies the primary cause of workplace accidents
20
+ - **Injury Severity**: Assesses the degree of potential injuries
21
+ - **Structured Output**: Provides results in JSON format for easy integration
22
+ - **Interactive Interface**: User-friendly Gradio web interface
23
+
24
+ ## πŸ”§ Model Details
25
+
26
+ - **Base Model**: DistilGPT-2
27
+ - **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
28
+ - **Training Data**: OSHA workplace accident reports
29
+ - **Model Size**: ~82M parameters (base) + 589K LoRA parameters
30
+
31
+ ## πŸ“‹ Output Format
32
+
33
+ The model generates structured predictions in the following format:
34
+
35
+ ```json
36
+ {
37
+ "Hazards": ["MECHANICAL POWER PRESS", "AMPUTATION", "FINGER", "GUARD"],
38
+ "Cause of Accident": "Caught in or between caused by Catch Point/Puncture Action",
39
+ "Degree of Injury": "Medium"
40
+ }
41
+ ```
42
+
43
+ ## πŸš€ Usage
44
+
45
+ 1. Enter a workplace scenario description in the text box
46
+ 2. Adjust creativity and response length settings if needed
47
+ 3. Click "Analyze Scenario" to generate predictions
48
+ 4. View results in the structured output panels
49
+
50
+ ## πŸ’‘ Example Scenarios
51
+
52
+ - Power press operations with safety hazards
53
+ - Falls from ladders or elevated surfaces
54
+ - Chemical exposure incidents
55
+ - Manual lifting injuries
56
+ - Construction site accidents
57
+
58
+ ## ⚠️ Important Notice
59
+
60
+ This model is designed for **educational and research purposes only**. Always consult qualified safety professionals for real workplace safety assessments and decisions.
61
+
62
+ ## πŸ› οΈ Technical Implementation
63
+
64
+ - **Framework**: Hugging Face Transformers + PEFT
65
+ - **Interface**: Gradio
66
+ - **Deployment**: Hugging Face Spaces
67
+ - **Training**: Fine-tuned on OSHA incident reports using LoRA
68
+
69
+ ## πŸ“Š Model Performance
70
+
71
+ 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.
72
+
73
+ ## 🀝 Contributing
74
+
75
+ Issues and suggestions are welcome! This model can be further improved with:
76
+ - Additional training data
77
+ - Domain-specific fine-tuning
78
+ - Enhanced post-processing
79
+ - Multi-language support
80
+
81
+ ## πŸ“œ License
82
+
83
+ MIT License - Feel free to use and modify for educational and research purposes.
84
+
85
+ ---
86
+
87
+ *Built with ❀️ using Hugging Face Transformers and Gradio*