Spaces:
biodivx
/
Sleeping

amroa commited on
Commit
07e644e
·
1 Parent(s): abede12

new model names

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -82,8 +82,8 @@ def download_model(url, model_path):
82
  f.write(response.content)
83
 
84
  # Model URL and path
85
- model_urls = [f'https://huggingface.co/shiyi-li/BirdAST/resolve/main/BirdAST_Baseline_5folds_fold_{i}.pth' for i in range(5)]
86
- model_paths = [f'BirdAST_Baseline_5folds_fold_{i}.pth' for i in range(5)]
87
 
88
  for (model_url, model_path) in zip(model_urls, model_paths):
89
  download_model(model_url, model_path)
@@ -99,7 +99,7 @@ for i in range(5):
99
  eval_models[i].eval()
100
 
101
  # Load the species mapping
102
- label_mapping = pd.read_csv('BirdAST_Baseline_5folds_label_map.csv')
103
  species_id_to_name = {row['species_id']: row['scientific_name'] for index, row in label_mapping.iterrows()}
104
 
105
  def preprocess_for_inference(audio_arr, sr):
 
82
  f.write(response.content)
83
 
84
  # Model URL and path
85
+ model_urls = [f'https://huggingface.co/shiyi-li/BirdAST/resolve/main/BirdAST_Baseline_GroupKFold_fold_{i}.pth' for i in range(5)]
86
+ model_paths = [f'BirdAST_Baseline_GroupKFold_fold_{i}.pth' for i in range(5)]
87
 
88
  for (model_url, model_path) in zip(model_urls, model_paths):
89
  download_model(model_url, model_path)
 
99
  eval_models[i].eval()
100
 
101
  # Load the species mapping
102
+ label_mapping = pd.read_csv('BirdAST_Baseline_GroupKFold_label_map.csv')
103
  species_id_to_name = {row['species_id']: row['scientific_name'] for index, row in label_mapping.iterrows()}
104
 
105
  def preprocess_for_inference(audio_arr, sr):