Spaces:
Running
Running
Commit
Β·
3b9cf95
1
Parent(s):
4037c9e
update server
Browse files- serve/gradio_web_i2s.py +8 -2
- serve/gradio_web_t2s.py +12 -6
- serve/leaderboard.py +7 -0
- serve/utils.py +1 -1
serve/gradio_web_i2s.py
CHANGED
|
@@ -32,6 +32,7 @@ def build_i2s_ui_side_by_side_anony(models):
|
|
| 32 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Image-to-3D generative models
|
| 33 |
## π Rules
|
| 34 |
- Upload image to two anonymous models in same area and vote for the better one!
|
|
|
|
| 35 |
- When the results are ready, click the buttons below to vote.
|
| 36 |
- Until all dimensions have been voted, the anonymous models are displayed.
|
| 37 |
- Click "Clear" to start a new round.
|
|
@@ -300,8 +301,8 @@ def build_i2s_ui_side_by_side_named(models):
|
|
| 300 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Image-to-3D generative models
|
| 301 |
## π Rules
|
| 302 |
- Generate with any two selected models side-by-side and vote!
|
| 303 |
-
- Sample
|
| 304 |
-
-
|
| 305 |
- Click "Clear" to start a new round.
|
| 306 |
|
| 307 |
## π Arena Elo
|
|
@@ -663,6 +664,11 @@ Find out who is the π₯conditional image generation models! More models are goi
|
|
| 663 |
def build_i2s_ui_single_model(models):
|
| 664 |
notice_markdown = """
|
| 665 |
# ποΈ Play with Image-to-3D Generation Models
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
|
| 667 |
## π€ Choose any model to generate
|
| 668 |
|
|
|
|
| 32 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Image-to-3D generative models
|
| 33 |
## π Rules
|
| 34 |
- Upload image to two anonymous models in same area and vote for the better one!
|
| 35 |
+
- Sample an image and click "Send" to start a generation.
|
| 36 |
- When the results are ready, click the buttons below to vote.
|
| 37 |
- Until all dimensions have been voted, the anonymous models are displayed.
|
| 38 |
- Click "Clear" to start a new round.
|
|
|
|
| 301 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Image-to-3D generative models
|
| 302 |
## π Rules
|
| 303 |
- Generate with any two selected models side-by-side and vote!
|
| 304 |
+
- Sample an image and click "Send" to start a generation.
|
| 305 |
+
- When the results are ready, click the buttons below to vote.
|
| 306 |
- Click "Clear" to start a new round.
|
| 307 |
|
| 308 |
## π Arena Elo
|
|
|
|
| 664 |
def build_i2s_ui_single_model(models):
|
| 665 |
notice_markdown = """
|
| 666 |
# ποΈ Play with Image-to-3D Generation Models
|
| 667 |
+
## π Rules
|
| 668 |
+
- Generate with a selected models and vote!
|
| 669 |
+
- Sample an image and click "Send" to start a generation.
|
| 670 |
+
- When the results are ready, click the buttons below to vote.
|
| 671 |
+
- Click "Clear" to start a new round.
|
| 672 |
|
| 673 |
## π€ Choose any model to generate
|
| 674 |
|
serve/gradio_web_t2s.py
CHANGED
|
@@ -32,6 +32,7 @@ def build_t2s_ui_side_by_side_anony(models):
|
|
| 32 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Text-to-3D generative models
|
| 33 |
## π Rules
|
| 34 |
- Input prompt to two anonymous models in same area and vote for the better one!
|
|
|
|
| 35 |
- When the results are ready, click the buttons below to vote.
|
| 36 |
- Until all dimensions have been voted, the anonymous models are displayed.
|
| 37 |
- Click "Clear" to start a new round.
|
|
@@ -144,7 +145,7 @@ Find out who is the π₯ text-to-3D generation models! More models are going to
|
|
| 144 |
with gr.Row():
|
| 145 |
textbox = gr.Textbox(
|
| 146 |
show_label=False,
|
| 147 |
-
placeholder=
|
| 148 |
container=True,
|
| 149 |
elem_id="input_box",
|
| 150 |
interactive=False, ## only support offline
|
|
@@ -292,8 +293,8 @@ def build_t2s_ui_side_by_side_named(models):
|
|
| 292 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Text-to-3D generative models
|
| 293 |
## π Rules
|
| 294 |
- Generate with any two selected models side-by-side and vote!
|
| 295 |
-
- Sample prompt
|
| 296 |
-
-
|
| 297 |
- Click "Clear" to start a new round.
|
| 298 |
|
| 299 |
## π Arena Elo
|
|
@@ -416,7 +417,7 @@ Find out who is the π₯conditional image generation models! More models are goi
|
|
| 416 |
with gr.Row():
|
| 417 |
textbox = gr.Textbox(
|
| 418 |
show_label=False,
|
| 419 |
-
placeholder=
|
| 420 |
container=True,
|
| 421 |
elem_id="input_box",
|
| 422 |
interactive=False, ## only support offline
|
|
@@ -592,8 +593,13 @@ def build_t2s_ui_single_model(models):
|
|
| 592 |
notice_markdown = """
|
| 593 |
# ποΈ Play with Text-to-3D Generation Models
|
| 594 |
|
| 595 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
| 596 |
|
|
|
|
| 597 |
"""
|
| 598 |
model_list = models.get_t2s_models()
|
| 599 |
gen_func = partial(generate_t2s, models.inference, models.render)
|
|
@@ -651,7 +657,7 @@ def build_t2s_ui_single_model(models):
|
|
| 651 |
with gr.Row():
|
| 652 |
textbox = gr.Textbox(
|
| 653 |
show_label=False,
|
| 654 |
-
placeholder=
|
| 655 |
container=True,
|
| 656 |
elem_id="input_box",
|
| 657 |
interactive=False, ## only support offline
|
|
|
|
| 32 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Text-to-3D generative models
|
| 33 |
## π Rules
|
| 34 |
- Input prompt to two anonymous models in same area and vote for the better one!
|
| 35 |
+
- Sample a prompt and click "Send" to start a generation.
|
| 36 |
- When the results are ready, click the buttons below to vote.
|
| 37 |
- Until all dimensions have been voted, the anonymous models are displayed.
|
| 38 |
- Click "Clear" to start a new round.
|
|
|
|
| 145 |
with gr.Row():
|
| 146 |
textbox = gr.Textbox(
|
| 147 |
show_label=False,
|
| 148 |
+
placeholder='π Sample a random prompt, and press "Send" to start a generation',
|
| 149 |
container=True,
|
| 150 |
elem_id="input_box",
|
| 151 |
interactive=False, ## only support offline
|
|
|
|
| 293 |
# βοΈ 3DGen-Arena βοΈ : Benchmarking Text-to-3D generative models
|
| 294 |
## π Rules
|
| 295 |
- Generate with any two selected models side-by-side and vote!
|
| 296 |
+
- Sample a prompt and click "Send" to start a generation.
|
| 297 |
+
- When the results are ready, click the buttons below to vote.
|
| 298 |
- Click "Clear" to start a new round.
|
| 299 |
|
| 300 |
## π Arena Elo
|
|
|
|
| 417 |
with gr.Row():
|
| 418 |
textbox = gr.Textbox(
|
| 419 |
show_label=False,
|
| 420 |
+
placeholder='π Sample a random prompt, and press "Send" to start a generation',
|
| 421 |
container=True,
|
| 422 |
elem_id="input_box",
|
| 423 |
interactive=False, ## only support offline
|
|
|
|
| 593 |
notice_markdown = """
|
| 594 |
# ποΈ Play with Text-to-3D Generation Models
|
| 595 |
|
| 596 |
+
## π Rules
|
| 597 |
+
- Generate with a selected model and vote!
|
| 598 |
+
- Sample a prompt and click "Send" to start a generation.
|
| 599 |
+
- When the results are ready, click the buttons below to vote.
|
| 600 |
+
- Click "Clear" to start a new round.
|
| 601 |
|
| 602 |
+
## π€ Choose any model to generate
|
| 603 |
"""
|
| 604 |
model_list = models.get_t2s_models()
|
| 605 |
gen_func = partial(generate_t2s, models.inference, models.render)
|
|
|
|
| 657 |
with gr.Row():
|
| 658 |
textbox = gr.Textbox(
|
| 659 |
show_label=False,
|
| 660 |
+
placeholder='π Sample a random prompt, and press "Send" to start a generation',
|
| 661 |
container=True,
|
| 662 |
elem_id="input_box",
|
| 663 |
interactive=False, ## only support offline
|
serve/leaderboard.py
CHANGED
|
@@ -190,6 +190,13 @@ Contribute your vote π³οΈ at [vision-arena](https://huggingface.co/spaces/Wil
|
|
| 190 |
"""
|
| 191 |
return leaderboard_md
|
| 192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=False):
|
| 194 |
if elo_results_file is None: # Do live update
|
| 195 |
md = "Loading ..."
|
|
|
|
| 190 |
"""
|
| 191 |
return leaderboard_md
|
| 192 |
|
| 193 |
+
def build_empty_leaderboard_tab():
|
| 194 |
+
leaderboard_md = f"""
|
| 195 |
+
# π³οΈ Leaderboard
|
| 196 |
+
## Look forward to your votes, and the leaderboard is coming soon!
|
| 197 |
+
"""
|
| 198 |
+
gr.Markdown(leaderboard_md, elem_id="leaderboard_markdown")
|
| 199 |
+
|
| 200 |
def build_leaderboard_tab(elo_results_file, leaderboard_table_file, show_plot=False):
|
| 201 |
if elo_results_file is None: # Do live update
|
| 202 |
md = "Loading ..."
|
serve/utils.py
CHANGED
|
@@ -20,7 +20,7 @@ no_change_btn = gr.update(value="No Change", interactive=True, visible=True)
|
|
| 20 |
def build_about():
|
| 21 |
about_markdown = f"""
|
| 22 |
# About Us
|
| 23 |
-
Only offline
|
| 24 |
Supported by Shanghai AI Laboratory
|
| 25 |
|
| 26 |
## Contributors:
|
|
|
|
| 20 |
def build_about():
|
| 21 |
about_markdown = f"""
|
| 22 |
# About Us
|
| 23 |
+
Only offline generations are available now, online services are coming soon! \n
|
| 24 |
Supported by Shanghai AI Laboratory
|
| 25 |
|
| 26 |
## Contributors:
|