Spaces:
Runtime error
Runtime error
import sys | |
import os | |
sys.path.append("../env") | |
import pandas as pd | |
import numpy as np | |
from datasets import load_dataset | |
def get_score(submission_folder = "../env"): | |
submission_path = os.path.join(submission_folder, "submission.csv") | |
submission = pd.read_csv(submission_path) | |
test_data = pd.read_csv(os.path.join(os.path.dirname(__file__),'answer.csv')) | |
correct_matches = submission['Transported'] == test_data['Transported'] | |
accuracy = correct_matches.sum() / len(submission) | |
return accuracy | |
if __name__ == "__main__": | |
print(get_score()) |