Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,16 +8,20 @@ from huggingface_hub import hf_hub_download
|
|
| 8 |
# Download models from Hugging Face Hub
|
| 9 |
# (replace repo_ids with your actual repos)
|
| 10 |
# -----------------------------
|
|
|
|
| 11 |
kinara_path = hf_hub_download(repo_id="mjpsm/Kinara-xgb-model", filename="Kinara_xgb_model.pkl")
|
| 12 |
ubuntu_path = hf_hub_download(repo_id="mjpsm/Ubuntu-xgb-model", filename="Ubuntu_xgb_model.pkl")
|
| 13 |
jali_path = hf_hub_download(repo_id="mjpsm/Jali-xgb-model", filename="Jali_xgb_model.pkl")
|
| 14 |
|
| 15 |
available_models = {
|
|
|
|
| 16 |
"Kinara": joblib.load(kinara_path),
|
| 17 |
"Ubuntu": joblib.load(ubuntu_path),
|
| 18 |
"Jali": joblib.load(jali_path),
|
| 19 |
}
|
| 20 |
|
|
|
|
|
|
|
| 21 |
# Archetype list (15 total, 12 fillers for now)
|
| 22 |
all_archetypes = [
|
| 23 |
"Griot", "Kinara", "Ubuntu", "Jali", "Sankofa", "Imani", "Maji",
|
|
@@ -48,3 +52,4 @@ def soulprint_snapshot(input: TextInput):
|
|
| 48 |
snapshot[name] = 0.0 # filler until model is ready
|
| 49 |
|
| 50 |
return {"soulprint_snapshot": snapshot}
|
|
|
|
|
|
| 8 |
# Download models from Hugging Face Hub
|
| 9 |
# (replace repo_ids with your actual repos)
|
| 10 |
# -----------------------------
|
| 11 |
+
griot_path = hf_hub_download(repo_id="mjpsm/Griot-xgb-model", filename="griot_xgb_regression_model_updated_parameters.pkl")
|
| 12 |
kinara_path = hf_hub_download(repo_id="mjpsm/Kinara-xgb-model", filename="Kinara_xgb_model.pkl")
|
| 13 |
ubuntu_path = hf_hub_download(repo_id="mjpsm/Ubuntu-xgb-model", filename="Ubuntu_xgb_model.pkl")
|
| 14 |
jali_path = hf_hub_download(repo_id="mjpsm/Jali-xgb-model", filename="Jali_xgb_model.pkl")
|
| 15 |
|
| 16 |
available_models = {
|
| 17 |
+
"Griot": joblib.load(griot_path),
|
| 18 |
"Kinara": joblib.load(kinara_path),
|
| 19 |
"Ubuntu": joblib.load(ubuntu_path),
|
| 20 |
"Jali": joblib.load(jali_path),
|
| 21 |
}
|
| 22 |
|
| 23 |
+
|
| 24 |
+
|
| 25 |
# Archetype list (15 total, 12 fillers for now)
|
| 26 |
all_archetypes = [
|
| 27 |
"Griot", "Kinara", "Ubuntu", "Jali", "Sankofa", "Imani", "Maji",
|
|
|
|
| 52 |
snapshot[name] = 0.0 # filler until model is ready
|
| 53 |
|
| 54 |
return {"soulprint_snapshot": snapshot}
|
| 55 |
+
|