Spaces:
Running
Running
File size: 890 Bytes
65c6479 441cdc8 e608ddc 65c6479 e608ddc 65c6479 441cdc8 e608ddc 441cdc8 48d8b0b 441cdc8 65c6479 441cdc8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import gradio as gr
import pandas as pd
import os
from huggingface_hub import snapshot_download
# clone / pull the lmeh eval data
TOKEN = os.environ.get("TOKEN", None)
RESULTS_REPO = f"lukecq/SeaExam-results"
CACHE_PATH=os.getenv("HF_HOME", ".")
EVAL_RESULTS_PATH = os.path.join(CACHE_PATH, "eval-results")
print(EVAL_RESULTS_PATH)
snapshot_download(
repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset",
token=TOKEN
)
# Load the CSV file
def load_csv(file_path):
data = pd.read_csv(file_path)
return data
# Example path to your CSV file
csv_path = f'{EVAL_RESULTS_PATH}/SeaExam_results_0419.csv'
data = load_csv(csv_path)
def show_data():
return data
iface = gr.Interface(fn=show_data, inputs = None, outputs="dataframe", title="SeaExam Leaderboard",
description="Leaderboard for the SeaExam competition.")
iface.launch()
|