rodrigomasini commited on
Commit
9c9016b
·
verified ·
1 Parent(s): 72b671b

Update src/submission/submit.py

Browse files
Files changed (1) hide show
  1. src/submission/submit.py +3 -3
src/submission/submit.py CHANGED
@@ -3,7 +3,7 @@ import os
3
  from datetime import datetime, timezone
4
 
5
  from src.display.formatting import styled_error, styled_message, styled_warning
6
- from src.envs import API, EVAL_REQUESTS_PATH, READ_TOKEN, QUEUE_REPO
7
  from src.submission.check_validity import (
8
  already_submitted_models,
9
  check_model_card,
@@ -45,13 +45,13 @@ def add_new_eval(
45
 
46
  # Is the model on the hub?
47
  if weight_type in ["Delta", "Adapter"]:
48
- base_model_on_hub, error, _ = is_model_on_hub(model_name=base_model, revision=revision, token=READ_TOKEN,
49
  test_tokenizer=True)
50
  if not base_model_on_hub:
51
  return styled_error(f'Base model "{base_model}" {error}')
52
 
53
  if not weight_type == "Adapter":
54
- model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=READ_TOKEN,
55
  test_tokenizer=True)
56
  if not model_on_hub:
57
  return styled_error(f'Model "{model}" {error}')
 
3
  from datetime import datetime, timezone
4
 
5
  from src.display.formatting import styled_error, styled_message, styled_warning
6
+ from src.envs import API, EVAL_REQUESTS_PATH, TOKEN, QUEUE_REPO
7
  from src.submission.check_validity import (
8
  already_submitted_models,
9
  check_model_card,
 
45
 
46
  # Is the model on the hub?
47
  if weight_type in ["Delta", "Adapter"]:
48
+ base_model_on_hub, error, _ = is_model_on_hub(model_name=base_model, revision=revision, token=TOKEN,
49
  test_tokenizer=True)
50
  if not base_model_on_hub:
51
  return styled_error(f'Base model "{base_model}" {error}')
52
 
53
  if not weight_type == "Adapter":
54
+ model_on_hub, error, _ = is_model_on_hub(model_name=model, revision=revision, token=TOKEN,
55
  test_tokenizer=True)
56
  if not model_on_hub:
57
  return styled_error(f'Model "{model}" {error}')