its-zion-18 commited on
Commit
5deec10
·
verified ·
1 Parent(s): 166c87c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -6,6 +6,19 @@ import pandas as pd
6
  import gradio as gr
7
  import huggingface_hub
8
  import autogluon.tabular as agt
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  # --- Settings and Metadata ---
11
  MODEL_REPO_ID = "bcueva/2024-24679-tabular-autolguon-predictor"
 
6
  import gradio as gr
7
  import huggingface_hub
8
  import autogluon.tabular as agt
9
+ import shutil
10
+
11
+ # --- Model Loading ---
12
+ def _prepare_predictor_dir() -> str:
13
+ """Downloads and extracts the model files from Hugging Face."""
14
+ # Add a check to clear the cache before download
15
+ if CACHE_DIR.exists():
16
+ print(f"Clearing cache directory: {CACHE_DIR}")
17
+ shutil.rmtree(CACHE_DIR)
18
+ CACHE_DIR.mkdir(parents=True, exist_ok=True)
19
+
20
+
21
+
22
 
23
  # --- Settings and Metadata ---
24
  MODEL_REPO_ID = "bcueva/2024-24679-tabular-autolguon-predictor"