Omartificial-Intelligence-Space commited on
Commit
486bbdb
·
verified ·
1 Parent(s): 4b76540

update submit

Browse files
Files changed (1) hide show
  1. src/submission/submit.py +3 -0
src/submission/submit.py CHANGED
@@ -18,6 +18,8 @@ from src.submission.check_validity import (
18
  is_model_on_hub,
19
  )
20
 
 
 
21
  REQUESTED_MODELS = None
22
  USERS_TO_SUBMISSION_DATES = None
23
 
@@ -66,6 +68,7 @@ def get_top_prediction(text, tokenizer, model):
66
  top_option = max(option_logits, key=lambda x: x[0])[1]
67
  return top_option
68
 
 
69
  def evaluate_model_accuracy_by_subject(model_name, num_examples):
70
  try:
71
  # Load the model and tokenizer
 
18
  is_model_on_hub,
19
  )
20
 
21
+ +import spaces
22
+
23
  REQUESTED_MODELS = None
24
  USERS_TO_SUBMISSION_DATES = None
25
 
 
68
  top_option = max(option_logits, key=lambda x: x[0])[1]
69
  return top_option
70
 
71
+ @spaces.GPU(duration=300)
72
  def evaluate_model_accuracy_by_subject(model_name, num_examples):
73
  try:
74
  # Load the model and tokenizer