Spaces:
Running
Running
Create app.py
Browse files- app/app.py +58 -0
app/app.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import streamlit.components.v1 as components
|
| 3 |
+
|
| 4 |
+
from st_on_hover_tabs import on_hover_tabs
|
| 5 |
+
|
| 6 |
+
from pages import *
|
| 7 |
+
|
| 8 |
+
import json
|
| 9 |
+
|
| 10 |
+
# if __name__ == "__main__":
|
| 11 |
+
st.set_page_config(
|
| 12 |
+
page_title="Leaderboard", page_icon=":chart_with_upwards_trend:", layout="wide"
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
st.header("SeaEval Leaderboard")
|
| 16 |
+
st.markdown('<style>' + open('./style/sidebar_style.css').read() + '</style>', unsafe_allow_html=True)
|
| 17 |
+
|
| 18 |
+
with st.sidebar:
|
| 19 |
+
tabs = on_hover_tabs(tabName=['Dashboard', 'Cross-Lingual Consistency', 'Cultural Reasoning',
|
| 20 |
+
'General Reasoning', 'FLORES-Translation', 'Emotion', 'Dialogue', 'Fundamental NLP Tasks'],
|
| 21 |
+
iconName=['dashboard', 'filter_1', 'filter_2', 'filter_3', 'filter_4',
|
| 22 |
+
'filter_5', 'filter_6', 'filter_7'],
|
| 23 |
+
styles = {
|
| 24 |
+
'navtab': {
|
| 25 |
+
'font-size': '12px',
|
| 26 |
+
'transition': '.1s',
|
| 27 |
+
},
|
| 28 |
+
'iconStyle':{
|
| 29 |
+
'font-size': '18px',
|
| 30 |
+
},
|
| 31 |
+
},
|
| 32 |
+
default_choice=0
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
if tabs =='Dashboard':
|
| 37 |
+
dashboard()
|
| 38 |
+
|
| 39 |
+
elif tabs == 'Cross-Lingual Consistency':
|
| 40 |
+
cross_lingual_consistency()
|
| 41 |
+
|
| 42 |
+
elif tabs == 'Cultural Reasoning':
|
| 43 |
+
cultural_reasoning()
|
| 44 |
+
|
| 45 |
+
elif tabs == 'General Reasoning':
|
| 46 |
+
general_reasoning()
|
| 47 |
+
|
| 48 |
+
elif tabs == 'FLORES-Translation':
|
| 49 |
+
flores()
|
| 50 |
+
|
| 51 |
+
elif tabs == 'Emotion':
|
| 52 |
+
emotion()
|
| 53 |
+
|
| 54 |
+
elif tabs == 'Dialogue':
|
| 55 |
+
dialogue()
|
| 56 |
+
|
| 57 |
+
elif tabs == 'Fundamental NLP Tasks':
|
| 58 |
+
fundamental_nlp_tasks()
|