Spaces:
Runtime error
Runtime error
Corey Morris
commited on
Commit
·
3a8762c
1
Parent(s):
ffdb8d3
downloading json file from remote and then loading it
Browse files
app.py
CHANGED
@@ -2,13 +2,16 @@ import gradio as gr
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
import json
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
|
10 |
# Create a DataFrame from the results dictionary
|
11 |
-
data = pd.DataFrame(
|
12 |
|
13 |
# Sort the DataFrame by 'acc' column
|
14 |
data = data.sort_values('acc', ascending=False)
|
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
import json
|
5 |
+
import requests
|
6 |
|
7 |
+
|
8 |
+
# load from remote json file
|
9 |
+
FILE_URL = "https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/master/results/llama/llama-30B/llama-30B_mmlu_5-shot.json"
|
10 |
+
response = requests.get(FILE_URL)
|
11 |
+
data = response.json()
|
12 |
|
13 |
# Create a DataFrame from the results dictionary
|
14 |
+
data = pd.DataFrame(data['results']).T
|
15 |
|
16 |
# Sort the DataFrame by 'acc' column
|
17 |
data = data.sort_values('acc', ascending=False)
|