Spaces:
Running
Running
mylibrar
commited on
Commit
·
92274b2
1
Parent(s):
6713f3f
Remove double scroll bars and put results.json at the bottom of files list
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import tarfile
|
|
5 |
|
6 |
st.set_page_config(layout="wide")
|
7 |
|
|
|
|
|
|
|
8 |
PARENT_DIR: str = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
9 |
EVAL_DIR: str = os.path.join(PARENT_DIR, "eval-results")
|
10 |
st.title("K2 Evaluation Gallery")
|
@@ -35,7 +38,7 @@ def render_column(col_label):
|
|
35 |
file_list: list = sorted(f_name[:-len(suffix)] for f_name in os.listdir(os.path.join(EVAL_DIR, metric, n_shot, ckpt)))
|
36 |
if result_file in file_list:
|
37 |
file_list.remove(result_file)
|
38 |
-
file_list = [result_file]
|
39 |
file = st.selectbox("Select a file", file_list, key=col_label + '2', help="a list of raw output files from evaluation results")
|
40 |
file += suffix
|
41 |
with tarfile.open(os.path.join(EVAL_DIR, metric, n_shot, ckpt, file), "r:gz") as tar:
|
|
|
5 |
|
6 |
st.set_page_config(layout="wide")
|
7 |
|
8 |
+
# Disable scroll bar
|
9 |
+
st.html("<style> .main {overflow: hidden} </style>")
|
10 |
+
|
11 |
PARENT_DIR: str = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
12 |
EVAL_DIR: str = os.path.join(PARENT_DIR, "eval-results")
|
13 |
st.title("K2 Evaluation Gallery")
|
|
|
38 |
file_list: list = sorted(f_name[:-len(suffix)] for f_name in os.listdir(os.path.join(EVAL_DIR, metric, n_shot, ckpt)))
|
39 |
if result_file in file_list:
|
40 |
file_list.remove(result_file)
|
41 |
+
file_list = file_list + [result_file]
|
42 |
file = st.selectbox("Select a file", file_list, key=col_label + '2', help="a list of raw output files from evaluation results")
|
43 |
file += suffix
|
44 |
with tarfile.open(os.path.join(EVAL_DIR, metric, n_shot, ckpt, file), "r:gz") as tar:
|