Spaces:
Running
Running
File size: 7,495 Bytes
6d0d847 7bbec6f 6d0d847 |
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
import streamlit as st
from app.draw_diagram import *
def dashboard():
st.title("SeaEval")
"""
[gh]: https://github.com/SeaEval/SeaEval
[![GitHub Repo stars](https://img.shields.io/github/stars/SeaEval/SeaEval?style=social)][gh]
"""
seaeval_url = "https://seaeval.github.io/"
st.markdown("[SeaEval](%s) is the new benchmark for multilingual foundation models consisting of 28 dataset." % seaeval_url)
st.markdown(".... haven't finished yet ...")
def cross_lingual_consistency():
st.title("Cross-Lingual Consistency")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['Cross-MMLU', 'Cross-XQUAD', 'Cross-LogiQA']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
category_two_dict = {'Cross-MMLU': 'cross_mmlu',
'Cross-XQUAD': 'cross_xquad',
'Cross-LogiQA': 'cross_logiqa'}
left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with middle:
sort = st.selectbox('Sort', ['Accuracy','Cross-Lingual Consistency', 'AC3',
'English', 'Chinese', 'Spanish', 'Vietnamese'])
with right:
sorted = st.selectbox('by', ['Ascending', 'Descending'])
if category_one or category_two or sort or sorted:
category_one = category_one_dict[category_one]
category_two = category_two_dict[category_two]
draw_cross_lingual(category_one, category_two, sort, sorted)
else:
draw_cross_lingual('zero_shot', 'cross_mmlu', 'Accuracy', 'Descending')
def cultural_reasoning():
st.title("Cultural Reasoning")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['SG EVAL', 'CN EVAL', 'PH EVAL', 'US EVAL']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, right = st.columns([0.2, 0.2, 0.4, 0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with right:
sorted = st.selectbox('sorted by', ['Ascending', 'Descending'])
if category_one or category_two or sorted:
category_one = category_one_dict[category_one]
draw_only_acc('cultural_reasoning', category_one, category_two, sorted)
else:
draw_only_acc('cultural_reasoning', 'zero_shot', 'sg_eval', 'Descending')
def general_reasoning():
st.title("General Reasoning")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['MMLU', 'C Eval', 'CMMLU', 'ZBench', 'IndoMMLU']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, right = st.columns([0.2, 0.2, 0.4, 0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with right:
sorted = st.selectbox('sorted by', ['Ascending', 'Descending'])
if category_one or category_two or sorted:
category_one = category_one_dict[category_one]
draw_only_acc('general_reasoning', category_one, category_two, sorted)
else:
draw_only_acc('general_reasoning', 'zero_shot', 'MMLU Full', 'Descending')
def flores():
st.title("FLORES-Translation")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['Indonesian to English', 'Vitenamese to English', 'Chinese to English', 'Nalay to English']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, right = st.columns([0.2, 0.2, 0.4, 0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with right:
sorted = st.selectbox('sorted by', ['Ascending', 'Descending'])
if category_one or category_two or sorted:
category_one = category_one_dict[category_one]
draw_flores_translation(category_one, category_two, sorted)
else:
draw_flores_translation('zero_shot', 'Indonesian to English', 'Descending')
def emotion():
st.title("Emotion")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['Indonesian Emotion Classification', 'SST2']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, right = st.columns([0.2, 0.2, 0.4, 0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with right:
sorted = st.selectbox('sorted by', ['Ascending', 'Descending'])
if category_one or category_two or sorted:
category_one = category_one_dict[category_one]
draw_only_acc('emotion', category_one, category_two, sorted)
else:
draw_only_acc('emotion', 'zero_shot', 'Indonesian Emotion Classification', 'Descending')
def dialogue():
st.title("Dialogue")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['DREAM', 'SAMSum', 'DialogSum']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with middle:
if category_two == 'DREAM':
sort = st.selectbox('Sort', ['Accuracy'])
else:
sort = st.selectbox('Sort', ['Average', 'ROUGE-1', 'ROUGE-2', 'ROUGE-L'])
with right:
sorted = st.selectbox('by', ['Ascending', 'Descending'])
if category_one or category_two or sort or sorted:
category_one = category_one_dict[category_one]
draw_dialogue(category_one, category_two, sort, sorted)
else:
draw_dialogue('zero_shot', 'DREAM', sort[0],'Descending')
def fundamental_nlp_tasks():
st.title("Fundamental NLP Tasks")
filters_levelone = ['Zero Shot', 'Few Shot']
filters_leveltwo = ['OCNLI', 'C3', 'COLA', 'QQP', 'MNLI', 'QNLI', 'WNLI', 'RTE', 'MRPC']
category_one_dict = {'Zero Shot': 'zero_shot',
'Few Shot': 'few_shot'}
left, center, _, right = st.columns([0.2, 0.2, 0.4, 0.2])
with left:
category_one = st.selectbox('Select Zero / Few shot', filters_levelone)
with center:
category_two = st.selectbox('Select the sub-category', filters_leveltwo)
with right:
sorted = st.selectbox('sorted by', ['Ascending', 'Descending'])
if category_one or category_two or sorted:
category_one = category_one_dict[category_one]
draw_only_acc('fundamental_nlp_tasks', category_one, category_two, sorted)
else:
draw_only_acc('fundamental_nlp_tasks', 'zero_shot', 'OCNLI', 'Descending') |