Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,10 +25,10 @@ qa_model_dir = "./bert_mini_squadv2_finetuned"
|
|
25 |
os.makedirs(qa_model_dir, exist_ok=True)
|
26 |
|
27 |
qa_files = {
|
28 |
-
"pytorch_model.bin": "https://huggingface.co/spaces/
|
29 |
-
"config.json": "https://huggingface.co/spaces/
|
30 |
-
"tokenizer_config.json": "https://huggingface.co/spaces/
|
31 |
-
"vocab.txt": "https://huggingface.co/spaces/
|
32 |
}
|
33 |
|
34 |
for fname, furl in qa_files.items():
|
@@ -39,7 +39,7 @@ model_qa = AutoModelForQuestionAnswering.from_pretrained(qa_model_dir)
|
|
39 |
|
40 |
# ----------- Setup for Diabetes XGBoost Model (Risk Prediction) ------------
|
41 |
|
42 |
-
diabetes_pkl_url = "https://huggingface.co/spaces/
|
43 |
diabetes_pkl_path = "./diabetes_xgboost_model.pkl"
|
44 |
download_file(diabetes_pkl_url, diabetes_pkl_path)
|
45 |
diabetes_model = joblib.load(diabetes_pkl_path)
|
|
|
25 |
os.makedirs(qa_model_dir, exist_ok=True)
|
26 |
|
27 |
qa_files = {
|
28 |
+
"pytorch_model.bin": "https://huggingface.co/spaces/isana25/DoctorTwin/resolve/main/pytorch_model.bin",
|
29 |
+
"config.json": "https://huggingface.co/spaces/isana25/DoctorTwin/resolve/main/config.json",
|
30 |
+
"tokenizer_config.json": "https://huggingface.co/spaces/isana25/DoctorTwin/resolve/main/tokenizer_config.json",
|
31 |
+
"vocab.txt": "https://huggingface.co/spaces/isana25/DoctorTwin/resolve/main/vocab.txt",
|
32 |
}
|
33 |
|
34 |
for fname, furl in qa_files.items():
|
|
|
39 |
|
40 |
# ----------- Setup for Diabetes XGBoost Model (Risk Prediction) ------------
|
41 |
|
42 |
+
diabetes_pkl_url = "https://huggingface.co/spaces/isana25/DoctorTwin/resolve/main/diabetes_xgboost_model.pkl"
|
43 |
diabetes_pkl_path = "./diabetes_xgboost_model.pkl"
|
44 |
download_file(diabetes_pkl_url, diabetes_pkl_path)
|
45 |
diabetes_model = joblib.load(diabetes_pkl_path)
|