nschenone commited on
Commit
2c53e2f
1 Parent(s): 880a360

Added artist names to UI

Browse files
Files changed (2) hide show
  1. model_config.yaml +1 -1
  2. src/utils.py +2 -1
model_config.yaml CHANGED
@@ -3,7 +3,7 @@ Rap:
3
  artist_names:
4
  - Eminem
5
  - Hopsin
6
- - Kentrick Lamar
7
  mlflow_run_id: 16c4ff05d92a45d79d89572a58b6424b
8
  hf_commit_hash: ca066f322213fbeac8d036fafd32112e23837722
9
  task: text-generation
 
3
  artist_names:
4
  - Eminem
5
  - Hopsin
6
+ - Kendrick Lamar
7
  mlflow_run_id: 16c4ff05d92a45d79d89572a58b6424b
8
  hf_commit_hash: ca066f322213fbeac8d036fafd32112e23837722
9
  task: text-generation
src/utils.py CHANGED
@@ -8,7 +8,8 @@ def load_pipelines_from_config(config_path: str):
8
 
9
  models = {}
10
  for model, config in model_config.items():
11
- models[model] = pipeline(
 
12
  task=config["task"],
13
  model=config["model_name"],
14
  revision=config["hf_commit_hash"],
 
8
 
9
  models = {}
10
  for model, config in model_config.items():
11
+ name = f"{model} - ({', '.join(config['artist_names'])})"
12
+ models[name] = pipeline(
13
  task=config["task"],
14
  model=config["model_name"],
15
  revision=config["hf_commit_hash"],