Amirhoseinsh commited on
Commit
6154d25
β€’
1 Parent(s): 5fe765e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from deta import Deta
3
+ import streamlit as st
4
+
5
+
6
+ st.set_page_config(page_title="Persian LLM Leaderboard", page_icon=":bar_chart:", layout="wide")
7
+
8
+ with open('.streamlit/style.css') as f:
9
+ st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
10
+
11
+ st.markdown("<h1>Open Persian LLM Leaderboard</h1>", unsafe_allow_html=True)
12
+
13
+
14
+ DETA_KEY = st.secrets["DETA_KEY"]
15
+ deta = Deta(DETA_KEY)
16
+
17
+ database = deta.Base("submitted-models")
18
+
19
+ def insert_model(data): return database.put(data)
20
+ def fetch_all_models(): return database.fetch().items
21
+ def get_model_name(model): return database.get(model)
22
+
23
+
24
+ st.markdown("<br>", unsafe_allow_html=True)
25
+
26
+
27
+ tab1, tab2, tab3 = st.tabs([ "\u2001\u2001\u2001πŸ… LLM Benchmark\u2001\u2001\u2001",
28
+ "\u2001\u2001\u2001πŸš€ Submit A Model\u2001\u2001\u2001",
29
+ "\u2001\u2001\u2001πŸ“ About Leaderboard\u2001\u2001\u2001"])
30
+
31
+
32
+
33
+ summ_eval_metrics = ['BLEU', 'CHARF', 'TER']
34
+ qas_eval_metrics = ['F1', 'EXACT-MATCH']
35
+ mts_eval_metrics = ['CHARF', 'BLEU', 'TER']
36
+ mcq_eval_metrics = ['MC1', 'MC2']