Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -5,9 +5,10 @@ import pandas as pd
|
|
5 |
|
6 |
BASELINE = f'<a target="_blank" href=https://github.com/showlab/loveu-tgve-2023 style="color: blue; text-decoration: underline;text-decoration-style: dotted;">Tune-A-Video (Baseline)</a>'
|
7 |
COLS = ["Method", "Human Eval (Text Alignment) ⬆️", "Human Eval (Structure) ⬆️", "Human Eval (Quality) ⬆️", "Human Eval (Avg.) ⬆️",
|
8 |
-
"CLIPScore (Frame Consistency) ⬆️", "CLIPScore (Text Alignment) ⬆️", "PickScore ⬆️",
|
9 |
"References"]
|
10 |
-
|
|
|
|
|
11 |
|
12 |
|
13 |
def get_leaderboard():
|
@@ -38,10 +39,12 @@ def get_leaderboard():
|
|
38 |
dataframe = pd.DataFrame.from_records(all_data)
|
39 |
dataframe = dataframe.sort_values(by=['Human Eval (Avg.) ⬆️'], ascending=False)
|
40 |
print(dataframe)
|
41 |
-
|
42 |
-
|
|
|
|
|
43 |
|
44 |
-
leaderboard = get_leaderboard()
|
45 |
|
46 |
def refresh():
|
47 |
return get_leaderboard()
|
@@ -83,10 +86,14 @@ with block:
|
|
83 |
with gr.Row():
|
84 |
leaderboard_table = gr.components.Dataframe(value=leaderboard, headers=COLS,
|
85 |
datatype=TYPES, max_rows=10)
|
|
|
|
|
|
|
|
|
86 |
with gr.Row():
|
87 |
refresh_button = gr.Button("Refresh")
|
88 |
-
refresh_button.click(refresh, inputs=[], outputs=[leaderboard_table])
|
89 |
-
block.load(refresh, inputs=[], outputs=[leaderboard_table])
|
90 |
|
91 |
with gr.Tab("Baseline Demo"):
|
92 |
with gr.Row():
|
|
|
5 |
|
6 |
BASELINE = f'<a target="_blank" href=https://github.com/showlab/loveu-tgve-2023 style="color: blue; text-decoration: underline;text-decoration-style: dotted;">Tune-A-Video (Baseline)</a>'
|
7 |
COLS = ["Method", "Human Eval (Text Alignment) ⬆️", "Human Eval (Structure) ⬆️", "Human Eval (Quality) ⬆️", "Human Eval (Avg.) ⬆️",
|
|
|
8 |
"References"]
|
9 |
+
COLS_AUTO = ["Method", "CLIPScore (Text Alignment) ⬆️", "CLIPScore (Frame Consistency) ⬆️", "PickScore ⬆️"]
|
10 |
+
TYPES = ["markdown", "number", "number", "number", "number", "markdown"]
|
11 |
+
TYPES_AUTO = ["markdown", "number", "number", "number"]
|
12 |
|
13 |
|
14 |
def get_leaderboard():
|
|
|
39 |
dataframe = pd.DataFrame.from_records(all_data)
|
40 |
dataframe = dataframe.sort_values(by=['Human Eval (Avg.) ⬆️'], ascending=False)
|
41 |
print(dataframe)
|
42 |
+
dataframe_human = dataframe[COLS]
|
43 |
+
dataframe_auto = dataframe[COLS_AUTO]
|
44 |
+
dataframe_auto = dataframe_auto.sort_values(by=['CLIPScore (Text Alignment) ⬆️'], ascending=False)
|
45 |
+
return dataframe_human, dataframe_auto
|
46 |
|
47 |
+
leaderboard, leaderboard_auto = get_leaderboard()
|
48 |
|
49 |
def refresh():
|
50 |
return get_leaderboard()
|
|
|
86 |
with gr.Row():
|
87 |
leaderboard_table = gr.components.Dataframe(value=leaderboard, headers=COLS,
|
88 |
datatype=TYPES, max_rows=10)
|
89 |
+
with gr.Accordion("Expand for automated metrics results", open=False):
|
90 |
+
with gr.Row():
|
91 |
+
leaderboard_table_auto = gr.components.Dataframe(value=leaderboard_auto, headers=COLS_AUTO,
|
92 |
+
datatype=TYPES_AUTO, max_rows=10)
|
93 |
with gr.Row():
|
94 |
refresh_button = gr.Button("Refresh")
|
95 |
+
refresh_button.click(refresh, inputs=[], outputs=[leaderboard_table, leaderboard_table_auto])
|
96 |
+
block.load(refresh, inputs=[], outputs=[leaderboard_table, leaderboard_table_auto])
|
97 |
|
98 |
with gr.Tab("Baseline Demo"):
|
99 |
with gr.Row():
|