Terorra commited on
Commit
4b69489
·
1 Parent(s): 56b911d

modif_app_prepro

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -431,7 +431,7 @@ def load_models_from_hf():
431
 
432
  Cette fonction:
433
  1. Télécharge fraud_model.pkl (le modèle ML)
434
- 2. Télécharge preprocessor.plk (le preprocessor)
435
  3. Charge les 2 fichiers en mémoire
436
  4. Met à jour les variables globales model et preprocessor
437
 
@@ -455,8 +455,7 @@ def load_models_from_hf():
455
  print(f"\n⬇️ Download: {MODEL_FILENAME}...")
456
  model_path = hf_hub_download(
457
  repo_id=REPO_ID,
458
- filename=MODEL_FILENAME,
459
- revision=MODEL_VERSION, # None = latest
460
  cache_dir="/tmp" # Dossier de cache
461
  )
462
  print(f"✅ Téléchargé: {model_path}")
@@ -473,7 +472,6 @@ def load_models_from_hf():
473
  preprocessor_path = hf_hub_download(
474
  repo_id=REPO_ID,
475
  filename=PREPROCESSOR_FILENAME,
476
- revision=MODEL_VERSION,
477
  cache_dir="/tmp"
478
  )
479
  print(f"✅ Téléchargé: {preprocessor_path}")
 
431
 
432
  Cette fonction:
433
  1. Télécharge fraud_model.pkl (le modèle ML)
434
+ 2. Télécharge preprocessor.pkl (le preprocessor)
435
  3. Charge les 2 fichiers en mémoire
436
  4. Met à jour les variables globales model et preprocessor
437
 
 
455
  print(f"\n⬇️ Download: {MODEL_FILENAME}...")
456
  model_path = hf_hub_download(
457
  repo_id=REPO_ID,
458
+ filename=MODEL_FILENAME, # None = latest
 
459
  cache_dir="/tmp" # Dossier de cache
460
  )
461
  print(f"✅ Téléchargé: {model_path}")
 
472
  preprocessor_path = hf_hub_download(
473
  repo_id=REPO_ID,
474
  filename=PREPROCESSOR_FILENAME,
 
475
  cache_dir="/tmp"
476
  )
477
  print(f"✅ Téléchargé: {preprocessor_path}")