Seraph19 commited on
Commit
b2382d1
·
verified ·
1 Parent(s): 9baf47b

Update add_new_eval

Browse files
Files changed (1) hide show
  1. add_new_eval +15 -0
add_new_eval CHANGED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import AutoModelForSequenceClassification # Import AutoModel
2
+
3
+ def add_new_eval(model_name, base_model_name, revision_name, precision, weight_type, model_type):
4
+ try:
5
+ model = AutoModelForSequenceClassification.from_pretrained(
6
+ model_name, revision=revision_name, use_auth_token=093724Kira#
7
+ )
8
+ # ... (Load tokenizer, data, etc.)
9
+
10
+ # ... (Perform evaluation logic)
11
+
12
+ return "Evaluation results: ..." # Return evaluation results as a string
13
+
14
+ except Exception as e:
15
+ return f"Error: {e}"