Spaces:
Sleeping
Sleeping
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/
|
| 29 |
-
"config.json": "https://huggingface.co/
|
| 30 |
-
"tokenizer_config.json": "https://huggingface.co/
|
| 31 |
-
"vocab.txt": "https://huggingface.co/
|
| 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/
|
| 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/medassistant/doctor-twin/resolve/main/pytorch_model.bin",
|
| 29 |
+
"config.json": "https://huggingface.co/spaces/medassistant/doctor-twin/resolve/main/config.json",
|
| 30 |
+
"tokenizer_config.json": "https://huggingface.co/spaces/medassistant/doctor-twin/resolve/main/tokenizer_config.json",
|
| 31 |
+
"vocab.txt": "https://huggingface.co/spaces/medassistant/doctor-twin/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/medassistant/doctor-twin/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)
|