nurindahpratiwi commited on
Commit
f78f9c4
1 Parent(s): 6850087
Files changed (3) hide show
  1. README.md +0 -5
  2. app.py +6 -2
  3. requirements.txt +2 -1
README.md CHANGED
@@ -8,11 +8,6 @@ sdk_version: 1.27.1
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- extra_gated_prompt: "You agree to not use the model to conduct experiments that cause harm to human subjects."
12
- extra_gated_fields:
13
- Company: text
14
- Country: text
15
- I agree to use this model for non-commercial use ONLY: checkbox
16
  ---
17
 
18
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -2,15 +2,19 @@ import joblib
2
  import pandas as pd
3
  import streamlit as st
4
  from huggingface_hub import hf_hub_download
 
5
 
6
  REPO_ID = "chanyaphas/creditc"
7
 
 
 
 
8
  model = joblib.load(
9
- hf_hub_download(repo_id=REPO_ID, filename="model.joblib")
10
  )
11
 
12
  unique_values = joblib.load(
13
- hf_hub_download(repo_id=REPO_ID, filename="unique_values.joblib")
14
  )
15
 
16
  EDU_DICT = {'Lower secondary': 1,
 
2
  import pandas as pd
3
  import streamlit as st
4
  from huggingface_hub import hf_hub_download
5
+ from transformers import AutoModel
6
 
7
  REPO_ID = "chanyaphas/creditc"
8
 
9
+ access_token = st.secrets["HF_TOKEN"]
10
+
11
+
12
  model = joblib.load(
13
+ hf_hub_download(repo_id=REPO_ID, filename="model.joblib", token=access_token)
14
  )
15
 
16
  unique_values = joblib.load(
17
+ hf_hub_download(repo_id=REPO_ID, filename="unique_values.joblib", token=access_token)
18
  )
19
 
20
  EDU_DICT = {'Lower secondary': 1,
requirements.txt CHANGED
@@ -3,4 +3,5 @@ pandas
3
  scikit-learn==1.2.2
4
  xgboost==1.7.6
5
  altair<5
6
- huggingface_hub
 
 
3
  scikit-learn==1.2.2
4
  xgboost==1.7.6
5
  altair<5
6
+ huggingface_hub
7
+ transformers