Spaces:
Running
Running
yinanhe
commited on
Commit
·
33c3a6a
1
Parent(s):
ccf85bc
[feat] add optional info
Browse files- app.py +37 -9
- constants.py +1 -0
app.py
CHANGED
@@ -27,7 +27,15 @@ def add_new_eval(
|
|
27 |
revision_name_textbox: str,
|
28 |
model_link: str,
|
29 |
team_name: str,
|
30 |
-
contact_email: str
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
):
|
32 |
if input_file is None:
|
33 |
return "Error! Empty file!"
|
@@ -111,6 +119,8 @@ def add_new_eval(
|
|
111 |
|
112 |
csv_data.loc[col] = new_data
|
113 |
csv_data = csv_data.to_csv(CSV_DIR, index=False)
|
|
|
|
|
114 |
submission_repo.push_to_hub()
|
115 |
print("success update", model_name)
|
116 |
return gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
|
@@ -602,29 +612,39 @@ with block:
|
|
602 |
with gr.Row():
|
603 |
gr.Markdown("# ✉️✨ Submit your model evaluation json file here!", elem_classes="markdown-text")
|
604 |
|
|
|
|
|
605 |
with gr.Row():
|
606 |
with gr.Column():
|
607 |
model_name_textbox = gr.Textbox(
|
608 |
-
label="
|
609 |
)
|
610 |
revision_name_textbox = gr.Textbox(
|
611 |
-
label="Revision Model Name(Optional)", placeholder="
|
612 |
)
|
613 |
|
614 |
with gr.Column():
|
615 |
model_link = gr.Textbox(
|
616 |
-
label="
|
617 |
)
|
618 |
team_name = gr.Textbox(
|
619 |
label="Your Team Name(If left blank, it will be user upload)", placeholder="User Upload"
|
620 |
)
|
621 |
contact_email = gr.Textbox(
|
622 |
-
label="E-Mail(
|
623 |
)
|
624 |
-
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
with gr.Column():
|
627 |
-
|
628 |
input_file = gr.components.File(label = "Click to Upload a ZIP File", file_count="single", type='binary')
|
629 |
submit_button = gr.Button("Submit Eval")
|
630 |
submit_succ_button = gr.Markdown("Submit Success! Please press refresh and return to LeaderBoard!", visible=False)
|
@@ -640,7 +660,15 @@ with block:
|
|
640 |
revision_name_textbox,
|
641 |
model_link,
|
642 |
team_name,
|
643 |
-
contact_email
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
],
|
645 |
outputs=[submit_button, submit_succ_button, fail_textbox]
|
646 |
)
|
|
|
27 |
revision_name_textbox: str,
|
28 |
model_link: str,
|
29 |
team_name: str,
|
30 |
+
contact_email: str,
|
31 |
+
model_publish: str,
|
32 |
+
model_resolution: str,
|
33 |
+
model_fps: str,
|
34 |
+
model_frame: str,
|
35 |
+
model_video_length: str,
|
36 |
+
model_checkpoint: str,
|
37 |
+
model_commit_id: str,
|
38 |
+
model_video_format: str
|
39 |
):
|
40 |
if input_file is None:
|
41 |
return "Error! Empty file!"
|
|
|
119 |
|
120 |
csv_data.loc[col] = new_data
|
121 |
csv_data = csv_data.to_csv(CSV_DIR, index=False)
|
122 |
+
with open(INFO_DIR,'a') as f:
|
123 |
+
f.write(f"{model_name}\t{update_time}\t{model_publish}\t{model_resolution}\t{model_fps}\t{model_frame}\t{model_video_length}\t{model_checkpoint}\t{model_commit_id}\t{model_video_format}\n")
|
124 |
submission_repo.push_to_hub()
|
125 |
print("success update", model_name)
|
126 |
return gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
|
|
|
612 |
with gr.Row():
|
613 |
gr.Markdown("# ✉️✨ Submit your model evaluation json file here!", elem_classes="markdown-text")
|
614 |
|
615 |
+
with gr.Row():
|
616 |
+
gr.Markdown("Here is a required field", elem_classes="markdown-text")
|
617 |
with gr.Row():
|
618 |
with gr.Column():
|
619 |
model_name_textbox = gr.Textbox(
|
620 |
+
label="Model name", placeholder="Required field"
|
621 |
)
|
622 |
revision_name_textbox = gr.Textbox(
|
623 |
+
label="Revision Model Name(Optional)", placeholder="If you need to update the previous results, please fill in this line"
|
624 |
)
|
625 |
|
626 |
with gr.Column():
|
627 |
model_link = gr.Textbox(
|
628 |
+
label="Project Page/Paper Link/Github/HuggingFace Repo", placeholder="Required field. If filling in the wrong information, your results may be removed."
|
629 |
)
|
630 |
team_name = gr.Textbox(
|
631 |
label="Your Team Name(If left blank, it will be user upload)", placeholder="User Upload"
|
632 |
)
|
633 |
contact_email = gr.Textbox(
|
634 |
+
label="E-Mail(Will not be displayed)", placeholder="Required field"
|
635 |
)
|
636 |
+
with gr.Row():
|
637 |
+
gr.Markdown("The following is optional and will be synced to [GitHub] (https://github.com/Vchitect/VBench/tree/master/sampled_videos#what-are-the-details-of-the-video-generation-models)", elem_classes="markdown-text")
|
638 |
+
with gr.Row():
|
639 |
+
release_time = gr.Textbox(label="Time of Publish", placeholder="1970-01-01")
|
640 |
+
model_resolution = gr.Textbox(label="resolution", placeholder="Width x Height")
|
641 |
+
model_fps = gr.Textbox(label="model fps", placeholder="FPS(int)")
|
642 |
+
model_frame = gr.Textbox(label="model frame count", placeholder="INT")
|
643 |
+
model_video_length = gr.Textbox(label="model video length", placeholder="float(2.0)")
|
644 |
+
model_checkpoint = gr.Textbox(label="model checkpoint", placeholder="optional")
|
645 |
+
model_commit_id = gr.Textbox(label="github commit id", placeholder='main')
|
646 |
+
model_video_format = gr.Textbox(label="pipeline format", placeholder='mp4')
|
647 |
with gr.Column():
|
|
|
648 |
input_file = gr.components.File(label = "Click to Upload a ZIP File", file_count="single", type='binary')
|
649 |
submit_button = gr.Button("Submit Eval")
|
650 |
submit_succ_button = gr.Markdown("Submit Success! Please press refresh and return to LeaderBoard!", visible=False)
|
|
|
660 |
revision_name_textbox,
|
661 |
model_link,
|
662 |
team_name,
|
663 |
+
contact_email,
|
664 |
+
release_time,
|
665 |
+
model_resolution,
|
666 |
+
model_fps,
|
667 |
+
model_frame,
|
668 |
+
model_video_length,
|
669 |
+
model_checkpoint,
|
670 |
+
model_commit_id,
|
671 |
+
model_video_format
|
672 |
],
|
673 |
outputs=[submit_button, submit_succ_button, fail_textbox]
|
674 |
)
|
constants.py
CHANGED
@@ -164,6 +164,7 @@ CSV_DIR = "./vbench_leaderboard_submission/results.csv"
|
|
164 |
QUALITY_DIR = "./vbench_leaderboard_submission/quality.csv"
|
165 |
I2V_DIR = "./vbench_leaderboard_submission/i2v_results.csv"
|
166 |
LONG_DIR = "./vbench_leaderboard_submission/long.csv"
|
|
|
167 |
|
168 |
COLUMN_NAMES = MODEL_INFO + TASK_INFO
|
169 |
COLUMN_NAMES_QUALITY = MODEL_INFO_TAB_QUALITY + QUALITY_TAB
|
|
|
164 |
QUALITY_DIR = "./vbench_leaderboard_submission/quality.csv"
|
165 |
I2V_DIR = "./vbench_leaderboard_submission/i2v_results.csv"
|
166 |
LONG_DIR = "./vbench_leaderboard_submission/long.csv"
|
167 |
+
INFO_DIR = "./vbench_leaderboard_submission/model_info.csv"
|
168 |
|
169 |
COLUMN_NAMES = MODEL_INFO + TASK_INFO
|
170 |
COLUMN_NAMES_QUALITY = MODEL_INFO_TAB_QUALITY + QUALITY_TAB
|