Spaces:
Running
Running
Commit
·
a4c3ce7
1
Parent(s):
6296cf9
update serve
Browse files- serve/gradio_web_i2s.py +3 -3
- serve/gradio_web_t2s.py +6 -4
- serve/utils.py +4 -7
serve/gradio_web_i2s.py
CHANGED
|
@@ -146,7 +146,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 146 |
width=512,
|
| 147 |
show_label=False,
|
| 148 |
visible=True,
|
| 149 |
-
interactive=
|
| 150 |
elem_id="input_box",
|
| 151 |
)
|
| 152 |
with gr.Column():
|
|
@@ -407,7 +407,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 407 |
width=512,
|
| 408 |
show_label=False,
|
| 409 |
visible=True,
|
| 410 |
-
interactive=
|
| 411 |
elem_id="input_box",
|
| 412 |
)
|
| 413 |
|
|
@@ -622,7 +622,7 @@ def build_i2s_ui_single_model(models):
|
|
| 622 |
width=512,
|
| 623 |
show_label=False,
|
| 624 |
visible=True,
|
| 625 |
-
interactive=
|
| 626 |
elem_id="input_box",
|
| 627 |
)
|
| 628 |
with gr.Column():
|
|
|
|
| 146 |
width=512,
|
| 147 |
show_label=False,
|
| 148 |
visible=True,
|
| 149 |
+
interactive=False, ## only support offline
|
| 150 |
elem_id="input_box",
|
| 151 |
)
|
| 152 |
with gr.Column():
|
|
|
|
| 407 |
width=512,
|
| 408 |
show_label=False,
|
| 409 |
visible=True,
|
| 410 |
+
interactive=False, ## only support offline
|
| 411 |
elem_id="input_box",
|
| 412 |
)
|
| 413 |
|
|
|
|
| 622 |
width=512,
|
| 623 |
show_label=False,
|
| 624 |
visible=True,
|
| 625 |
+
interactive=False, ## only support offline
|
| 626 |
elem_id="input_box",
|
| 627 |
)
|
| 628 |
with gr.Column():
|
serve/gradio_web_t2s.py
CHANGED
|
@@ -29,7 +29,7 @@ from .inference import(
|
|
| 29 |
|
| 30 |
def build_t2s_ui_side_by_side_anony(models):
|
| 31 |
notice_markdown = """
|
| 32 |
-
# ⚔️
|
| 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 button below to vote.
|
|
@@ -143,6 +143,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 143 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 144 |
container=True,
|
| 145 |
elem_id="input_box",
|
|
|
|
| 146 |
)
|
| 147 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 148 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
|
@@ -279,7 +280,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 279 |
|
| 280 |
def build_t2s_ui_side_by_side_named(models):
|
| 281 |
notice_markdown = """
|
| 282 |
-
# ⚔️
|
| 283 |
## 📜 Rules
|
| 284 |
- Generate with any two selected models side-by-side and vote!
|
| 285 |
- Sample or Input prompt you want to generate.
|
|
@@ -405,6 +406,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 405 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 406 |
container=True,
|
| 407 |
elem_id="input_box",
|
|
|
|
| 408 |
)
|
| 409 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 410 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
|
@@ -554,8 +556,7 @@ Find out who is the 🥇conditional image generation models! More models are goi
|
|
| 554 |
|
| 555 |
def build_t2s_ui_single_model(models):
|
| 556 |
notice_markdown = """
|
| 557 |
-
# 🏔️ Play with Image Generation Models
|
| 558 |
-
{promotion}
|
| 559 |
|
| 560 |
## 🤖 Choose any model to generate
|
| 561 |
|
|
@@ -618,6 +619,7 @@ def build_t2s_ui_single_model(models):
|
|
| 618 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 619 |
container=True,
|
| 620 |
elem_id="input_box",
|
|
|
|
| 621 |
)
|
| 622 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 623 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
|
|
|
| 29 |
|
| 30 |
def build_t2s_ui_side_by_side_anony(models):
|
| 31 |
notice_markdown = """
|
| 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 button below to vote.
|
|
|
|
| 143 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 144 |
container=True,
|
| 145 |
elem_id="input_box",
|
| 146 |
+
interactive=False, ## only support offline
|
| 147 |
)
|
| 148 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 149 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
|
|
|
| 280 |
|
| 281 |
def build_t2s_ui_side_by_side_named(models):
|
| 282 |
notice_markdown = """
|
| 283 |
+
# ⚔️ 3DGen-Arena ⚔️ : Benchmarking Text-to-3D generative models
|
| 284 |
## 📜 Rules
|
| 285 |
- Generate with any two selected models side-by-side and vote!
|
| 286 |
- Sample or Input prompt you want to generate.
|
|
|
|
| 406 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 407 |
container=True,
|
| 408 |
elem_id="input_box",
|
| 409 |
+
interactive=False, ## only support offline
|
| 410 |
)
|
| 411 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 412 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
|
|
|
| 556 |
|
| 557 |
def build_t2s_ui_single_model(models):
|
| 558 |
notice_markdown = """
|
| 559 |
+
# 🏔️ Play with Image-to-3D Generation Models
|
|
|
|
| 560 |
|
| 561 |
## 🤖 Choose any model to generate
|
| 562 |
|
|
|
|
| 619 |
placeholder="👉 Enter your prompt or Sample a random prompt, and press ENTER",
|
| 620 |
container=True,
|
| 621 |
elem_id="input_box",
|
| 622 |
+
interactive=False, ## only support offline
|
| 623 |
)
|
| 624 |
sample_btn = gr.Button(value="🎲 Sample", variant="primary", scale=0)
|
| 625 |
send_btn = gr.Button(value="📤 Send", variant="primary", scale=0)
|
serve/utils.py
CHANGED
|
@@ -20,16 +20,13 @@ no_change_btn = gr.update(value="No Change", interactive=True, visible=True)
|
|
| 20 |
def build_about():
|
| 21 |
about_markdown = f"""
|
| 22 |
# About Us
|
| 23 |
-
|
| 24 |
|
| 25 |
## Contributors:
|
| 26 |
-
|
| 27 |
|
| 28 |
## Contact:
|
| 29 |
-
Email:
|
| 30 |
-
|
| 31 |
-
## Advisors
|
| 32 |
-
[Wenhu Chen](https://wenhuchen.github.io/)
|
| 33 |
|
| 34 |
## Sponsorship
|
| 35 |
We are keep looking for sponsorship to support the arena project for the long term. Please contact us if you are interested in supporting this project.
|
|
@@ -41,7 +38,7 @@ We are keep looking for sponsorship to support the arena project for the long te
|
|
| 41 |
acknowledgment_md = """
|
| 42 |
### Acknowledgment
|
| 43 |
<div class="image-container">
|
| 44 |
-
<p> Our code base is built upon <a href="https://github.com/lm-sys/FastChat" target="_blank">FastChat</a> and <a href="https://github.com/TIGER-AI-Lab/
|
| 45 |
</div>
|
| 46 |
"""
|
| 47 |
|
|
|
|
| 20 |
def build_about():
|
| 21 |
about_markdown = f"""
|
| 22 |
# About Us
|
| 23 |
+
Supported by Shanghai AI Laboratory
|
| 24 |
|
| 25 |
## Contributors:
|
| 26 |
+
Yuhan Zhang, Mengchen Zhang, Tong Wu, Tengfei Wang, Ziwei Liu
|
| 27 |
|
| 28 |
## Contact:
|
| 29 |
+
Email: yhzhang4778@gmail.com
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## Sponsorship
|
| 32 |
We are keep looking for sponsorship to support the arena project for the long term. Please contact us if you are interested in supporting this project.
|
|
|
|
| 38 |
acknowledgment_md = """
|
| 39 |
### Acknowledgment
|
| 40 |
<div class="image-container">
|
| 41 |
+
<p> Our code base is built upon <a href="https://github.com/lm-sys/FastChat" target="_blank">FastChat</a> and <a href="https://github.com/TIGER-AI-Lab/GenAI-Arena" target="_blank">GenAI-Arena</a></p>.
|
| 42 |
</div>
|
| 43 |
"""
|
| 44 |
|