Spaces:
Running
Running
Teo Wu
commited on
Commit
•
78810bb
1
Parent(s):
c0ecd80
minimal
Browse files
app.py
CHANGED
@@ -1,20 +1,50 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
-
block = gr.Blocks(title="LongVideoBench Leaderboard")
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
11 |
df_sorted = data.sort_values(by='Test Total', ascending=False)
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
gr.Markdown(
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
)
|
18 |
-
|
19 |
|
20 |
block.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
|
|
3 |
|
4 |
+
block = gr.Blocks(title="LongVideoBench Leaderboard", theme='gradio/soft')
|
5 |
+
|
6 |
+
def sort_data(key):
|
7 |
+
data = pd.read_csv("result.csv")
|
8 |
+
if key in data.columns:
|
9 |
+
df_sorted = data.sort_values(by=key, ascending=False)
|
10 |
+
else:
|
11 |
df_sorted = data.sort_values(by='Test Total', ascending=False)
|
12 |
+
return df_sorted
|
13 |
+
|
14 |
+
with block:
|
15 |
|
16 |
+
gr.HTML("<link rel='stylesheet' type='text/css' href='style.css'>")
|
17 |
+
|
18 |
+
with gr.Row():
|
19 |
+
gr.Markdown("""
|
20 |
+
<div style='text-align: center;'>
|
21 |
+
<h1>LongVideoBench Leaderboard</h1>
|
22 |
+
Website: <a href="https://longvideobench.github.io" target="_blank">longvideobench.github.io</a>
|
23 |
+
</div>
|
24 |
+
""")
|
25 |
+
|
26 |
+
with gr.Tab("Existing Results"):
|
27 |
+
key_input = gr.Textbox(label="Sort by subset (default: Test Total)", placeholder="Enter column name to sort by")
|
28 |
+
data_frame = gr.DataFrame(sort_data('Test Total'))
|
29 |
+
|
30 |
+
def update_data_frame(key):
|
31 |
+
return sort_data(key)
|
32 |
+
|
33 |
+
key_input.change(update_data_frame, inputs=key_input, outputs=data_frame)
|
34 |
+
|
35 |
+
with gr.Tab("Submit!"):
|
36 |
gr.Markdown(
|
37 |
+
'''The answer of validation set of LongVideoBench is public now. Please see our [released dataset](https://huggingface.co/datasets/longvideobench/LongVideoBench) for more information.
|
38 |
+
|
39 |
+
For test set, please prepare your output as follows:
|
40 |
+
```python
|
41 |
+
{VIDEO_ID_0: "A", VIDEO_ID_1: "D", ...} # Please make sure your submission only contains the letter of model's choice, or starts with the letter of model's choice.
|
42 |
+
```
|
43 |
+
and submit to us as a JSON file.
|
44 |
+
|
45 |
+
Please prepare an email to `haoning001@e.ntu.edu.sg` titled [LongVideoBench-Submission-YOURNAME] to submit and obtain your results.
|
46 |
+
|
47 |
+
_We will launch an automatic submission server soon._'''
|
48 |
)
|
|
|
49 |
|
50 |
block.launch()
|