Pranjal2041 commited on
Commit
ed7d13f
1 Parent(s): 2106cfd

Add application file

Browse files
Files changed (1) hide show
  1. app.py +53 -0
app.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+
5
+ data = [
6
+ ['**Baseline**', 19.7, 19.6, 19.8, 19.8, 19.8, 19.8, 19.8, 19.8, 19.8, 19.8, 19.8, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
7
+ ['**Keyword Stuffing**', 19.6, 19.5, 19.8, 20.8, 19.8, 20.4, 20.6, 19.9, 21.1, 21.0, 20.6, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
8
+ ['**Unique Words**', 20.6, 20.5, 20.7, 20.8, 20.3, 20.5, 20.9, 20.4, 21.5, 21.2, 20.9, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
9
+ ['**Simple Language**', 21.5, 22.0, 21.5, 21.0, 21.1, 21.2, 20.9, 20.6, 21.9, 21.4, 21.3, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
10
+ ['**Authoritative Language**', 21.3, 21.2, 21.1, 22.3, 22.9, 22.1, 23.2, 21.9, 23.9, 23.0, 23.1, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
11
+ ['**Technical Language**', 22.5, 22.4, 22.5, 21.2, 21.8, 20.5, 21.1, 20.5, 22.1, 21.2, 21.4, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
12
+ ['**Fluent Language**', 24.4, 24.4, 24.4, 21.3, 23.2, 21.2, 21.4, 20.8, 23.2, 21.5, 22.1, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
13
+ ['**Citation Addition**', 25.5, 25.3, 25.3, 22.8, 24.2, 21.7, 22.3, 21.3, 23.5, 21.7, 22.9, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
14
+ ['**Quotes Addition**', 27.5, 27.6, 27.1, 24.4, 26.7, 24.6, 24.9, 23.2, 26.4, 24.1, 25.5, "[[1]](https://arxiv.org/abs/2310.18xxx)"],
15
+ ['**Adding Statistics**', 25.8, 26.0, 25.5, 23.1, 26.1, 23.6, 24.5, 22.4, 26.1, 23.8, 24.8, "[[1]](https://arxiv.org/abs/2310.18xxx)"]
16
+ ]
17
+
18
+ # Column names
19
+ columns = ['Method', 'Word', 'Position', 'WordPos Overall', 'Rel.', 'Infl.', 'Unique', 'Div.', 'FollowUp', 'Pos.', 'Count', 'Subjective Average', 'Source']
20
+
21
+ # Create a DataFrame
22
+ DATA_OVERALL = pd.DataFrame(data, columns=columns)
23
+ DATA_OVERALL.sort_values(by=['WordPos Overall'], inplace=True, ascending=False)
24
+
25
+ with gr.Blocks() as demo:
26
+ gr.Markdown(f"""
27
+ # GEO-Bench Leaderboard, for benchmarking conent optimziation methods for Generative Engines.
28
+ - To submit check [here](https://github.com/Pranjal2041/GEO/GEO-Bench/leaderboard/Readme.md)
29
+ - Refer to GEO paper for more [details](https://arxiv.org/abs/2310.18xxx)
30
+ """)
31
+
32
+ with gr.Tabs():
33
+
34
+ with gr.TabItem('Overall'):
35
+
36
+ with gr.Row():
37
+ gr.Markdown('## Overall Leaderboard')
38
+ with gr.Row():
39
+ data_overall = gr.components.Dataframe(
40
+ DATA_OVERALL,
41
+ datatype=["markdown"] + ["number"] * len(DATA_OVERALL.columns) + ['markdown'],
42
+ type="pandas",
43
+ wrap=True,
44
+ interactive=False,
45
+ )
46
+ with gr.Row():
47
+ data_run_overall = gr.Button("Refresh")
48
+ # data_run_overall.click(get_mteb_average, inputs=None, outputs=data_overall)
49
+
50
+
51
+
52
+ if __name__ == "__main__":
53
+ demo.launch()