Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -608,7 +608,7 @@ def compute_model_card_evaluation_results(tokenizer, model_checkpoint, raw_datas
|
|
608 |
result = trainer.evaluate()
|
609 |
return result
|
610 |
|
611 |
-
|
612 |
|
613 |
def main():
|
614 |
try:
|
@@ -622,6 +622,13 @@ def main():
|
|
622 |
except Exception as e:
|
623 |
logger.error(f"Error starting application: {e}")
|
624 |
raise
|
|
|
|
|
625 |
|
626 |
if __name__ == "__main__":
|
627 |
-
|
|
|
|
|
|
|
|
|
|
|
|
608 |
result = trainer.evaluate()
|
609 |
return result
|
610 |
|
611 |
+
"""
|
612 |
|
613 |
def main():
|
614 |
try:
|
|
|
622 |
except Exception as e:
|
623 |
logger.error(f"Error starting application: {e}")
|
624 |
raise
|
625 |
+
"""
|
626 |
+
|
627 |
|
628 |
if __name__ == "__main__":
|
629 |
+
model_checkpoint = model_checkpoint
|
630 |
+
raw_datasets = load_dataset(dataset_name, "mrpc")
|
631 |
+
metric = load("glue", "mrpc")
|
632 |
+
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
633 |
+
output = compute_model_card_evaluation_results(tokenizer, model_checkpoint, raw_datasets, metric)
|
634 |
+
print(json.dumps(output))
|