tajuarAkash commited on
Commit
4cf2b3f
·
verified ·
1 Parent(s): ab2076c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -3,10 +3,13 @@ import joblib
3
  import numpy as np
4
  import pandas as pd
5
  from sklearn.preprocessing import StandardScaler
 
6
 
7
- # Load the trained model from Hugging Face (if hosted there)
8
- # If your model file is in a sub-folder like 'models', use the correct path
9
- model = joblib.load('random_forest_model.joblib') # Correct this if needed
 
 
10
 
11
  # Title and description for the app
12
  st.title("Insurance Claim Fraud Detection")
 
3
  import numpy as np
4
  import pandas as pd
5
  from sklearn.preprocessing import StandardScaler
6
+ from huggingface_hub import hf_hub_download
7
 
8
+ # Download the model from Hugging Face Hub
9
+ model_path = hf_hub_download(repo_id="tajuarAkash/Health_Insurance_Fraud_detection_using_Random_forest", filename="random_forest_model.joblib")
10
+
11
+ # Load the model from the downloaded path
12
+ model = joblib.load(model_path)
13
 
14
  # Title and description for the app
15
  st.title("Insurance Claim Fraud Detection")