Spaces:
Runtime error
Runtime error
Fix model name
Browse files
utils.py
CHANGED
@@ -297,11 +297,11 @@ def update_darija_one_vs_all_leaderboard(result_df, model_name, target_lang, BIN
|
|
297 |
def handle_evaluation(model_path, model_path_bin, use_mapping=False):
|
298 |
|
299 |
# download model and get the model path
|
300 |
-
|
301 |
|
302 |
# Load the trained model
|
303 |
-
print(f"[INFO] Loading model from Path: {
|
304 |
-
model = fasttext.load_model(
|
305 |
|
306 |
# Load the evaluation dataset
|
307 |
print(f"[INFO] Loading evaluation dataset from Path: {DATA_PATH}...")
|
|
|
297 |
def handle_evaluation(model_path, model_path_bin, use_mapping=False):
|
298 |
|
299 |
# download model and get the model path
|
300 |
+
model_path_hub = hf_hub_download(repo_id=model_path, filename=model_path_bin, cache_dir=None)
|
301 |
|
302 |
# Load the trained model
|
303 |
+
print(f"[INFO] Loading model from Path: {model_path_hub}, using version {model_path_bin}...")
|
304 |
+
model = fasttext.load_model(model_path_hub)
|
305 |
|
306 |
# Load the evaluation dataset
|
307 |
print(f"[INFO] Loading evaluation dataset from Path: {DATA_PATH}...")
|