Spaces:
Sleeping
Sleeping
Upload 7 files
Browse files- .gitattributes +2 -0
- app.py +55 -0
- claims.csv +0 -0
- insurance_fraud_decetion_doc.docx +3 -0
- insurance_fraud_decetion_notebook.ipynb +3 -0
- insurance_fraud_model.joblib +3 -0
- requirements.txt +9 -0
- scaler_model.joblib +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
insurance_fraud_decetion_doc.docx filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
insurance_fraud_decetion_notebook.ipynb filter=lfs diff=lfs merge=lfs -text
|
app.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import joblib
|
| 3 |
+
|
| 4 |
+
# models
|
| 5 |
+
|
| 6 |
+
scaler=joblib.load('scaler_model.joblib')
|
| 7 |
+
|
| 8 |
+
insurance_model=joblib.load('insurance_fraud_model.joblib')
|
| 9 |
+
|
| 10 |
+
## Heading
|
| 11 |
+
html_temp = """
|
| 12 |
+
<div style="background-color:tomato;padding:10px">
|
| 13 |
+
<h2 style="color:Black;text-align:center;">Insurance Claims Analysis </h2>
|
| 14 |
+
</div>
|
| 15 |
+
"""
|
| 16 |
+
st.markdown(html_temp, unsafe_allow_html=True)
|
| 17 |
+
|
| 18 |
+
## inputs
|
| 19 |
+
|
| 20 |
+
## 'incident_cause'
|
| 21 |
+
option_incident=['Driver error',"Crime","Other driver error",'Natural causes','Other causes']
|
| 22 |
+
incident_case=st.selectbox("Select the cause of incident :",options=option_incident)
|
| 23 |
+
incident_values=option_incident.index(incident_case)
|
| 24 |
+
|
| 25 |
+
## 'claim_area'
|
| 26 |
+
|
| 27 |
+
option_claim_area=["Auto","Home"]
|
| 28 |
+
claim_area=st.selectbox("Select the Claim Area: ",option_claim_area)
|
| 29 |
+
claim_area_value=option_claim_area.index(claim_area)
|
| 30 |
+
|
| 31 |
+
## 'police_report'
|
| 32 |
+
option_police_report=['NO',"Unknow","Yes"]
|
| 33 |
+
police_report=st.selectbox("You have Given Police Report:",option_police_report)
|
| 34 |
+
police_report_value=option_police_report.index(police_report)
|
| 35 |
+
|
| 36 |
+
## 'claim_type'
|
| 37 |
+
option_claim_type=["Material only ","Injury only","Material and injury"]
|
| 38 |
+
claim_type=st.selectbox("Select the Type of Claim :",option_claim_type)
|
| 39 |
+
claim_type_value=option_claim_type.index(claim_type)
|
| 40 |
+
|
| 41 |
+
## 'claim_amount'
|
| 42 |
+
claim_amount=st.slider("Slide the Claim Amount:",min_value=1000,max_value=48150)
|
| 43 |
+
|
| 44 |
+
## 'total_policy_claims'
|
| 45 |
+
policy_claims=st.slider("Slide the No of Policies Claimed:",min_value=0,max_value=8)
|
| 46 |
+
|
| 47 |
+
if st.button("Submit"):
|
| 48 |
+
# st.write(incident_values,claim_area_value,police_report_value,claim_area_value,claim_amount,policy_claims)
|
| 49 |
+
values=scaler.transform([[incident_values,claim_area_value,police_report_value,claim_area_value,claim_amount,policy_claims]])
|
| 50 |
+
#st.write(values)
|
| 51 |
+
output=insurance_model.predict(values)
|
| 52 |
+
if output==0:
|
| 53 |
+
st.write("The Transaction is Not Faurd")
|
| 54 |
+
else:
|
| 55 |
+
st.write("The Transaction is Faurd")
|
claims.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
insurance_fraud_decetion_doc.docx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e83c6ddf323e01c7c2b232a12c0900972555ea6936aa39bf1ef498e85a74fccd
|
| 3 |
+
size 441253
|
insurance_fraud_decetion_notebook.ipynb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4864b4518d56b434602899dd71165ec728592d2b03e90628b9fe377352bbc61c
|
| 3 |
+
size 11283942
|
insurance_fraud_model.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6cd55fb747e88484cd822e7a4ec17f86d41e0900ed5b6d45ba8b6ae2543c665e
|
| 3 |
+
size 186589
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
joblib==1.2.0
|
| 2 |
+
matplotlib==3.7.1
|
| 3 |
+
matplotlib-inline==0.1.6
|
| 4 |
+
numpy==1.26.4
|
| 5 |
+
pandas==1.5.3
|
| 6 |
+
scikit-learn==1.6.0
|
| 7 |
+
streamlit==1.41.1
|
| 8 |
+
tabulate==0.8.10
|
| 9 |
+
imblearn==0.13.
|
scaler_model.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9570d6c2a7b3f18f15c95e7165a27258965ec324fe835198fe7c602268fe49e6
|
| 3 |
+
size 1319
|