Mukera / add_new_eval
Seraph19's picture
Update add_new_eval
b2382d1 verified
raw
history blame contribute delete
530 Bytes
from transformers import AutoModelForSequenceClassification # Import AutoModel
def add_new_eval(model_name, base_model_name, revision_name, precision, weight_type, model_type):
try:
model = AutoModelForSequenceClassification.from_pretrained(
model_name, revision=revision_name, use_auth_token=093724Kira#
)
# ... (Load tokenizer, data, etc.)
# ... (Perform evaluation logic)
return "Evaluation results: ..." # Return evaluation results as a string
except Exception as e:
return f"Error: {e}"