Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,27 +151,29 @@ def generate_image(
|
|
| 151 |
img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
|
| 152 |
return img, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
| 153 |
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
| 158 |
offload: bool = False):
|
| 159 |
|
| 160 |
with gr.Blocks(theme="soft") as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
<img src="https://img.shields.io/static/v1?label=OpenFree&message=BEST%20AI%20Services&color=%230000ff&labelColor=%23000080&logo=huggingface&logoColor=%23ffa500&style=for-the-badge" alt="OpenFree badge">
|
| 167 |
-
</a>
|
| 168 |
-
|
| 169 |
-
<a href="https://discord.gg/openfreeai" target="_blank">
|
| 170 |
-
<img src="https://img.shields.io/static/v1?label=Discord&message=Openfree%20AI&color=%230000ff&labelColor=%23800080&logo=discord&logoColor=white&style=for-the-badge" alt="Discord badge">
|
| 171 |
-
</a>
|
| 172 |
-
</div>
|
| 173 |
"""
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column():
|
|
|
|
| 151 |
img = Image.fromarray((127.5 * (x + 1.0)).cpu().byte().numpy())
|
| 152 |
return img, str(opts.seed), flux_generator.pulid_model.debug_img_list
|
| 153 |
|
|
|
|
|
|
|
|
|
|
| 154 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
| 155 |
offload: bool = False):
|
| 156 |
|
| 157 |
with gr.Blocks(theme="soft") as demo:
|
| 158 |
+
# HTML ์ฝ๋๋ with ๋ธ๋ก ์์ ๋ค์ฌ์ฐ๊ธฐ๋์ด์ผ ํฉ๋๋ค
|
| 159 |
+
gr.HTML(
|
| 160 |
+
"""
|
| 161 |
+
<div class='container' style='display:flex; justify-content:center; gap:12px;'>
|
| 162 |
+
<a href="https://huggingface.co/spaces/openfree/Best-AI" target="_blank">
|
| 163 |
+
<img src="https://img.shields.io/static/v1?label=OpenFree&message=BEST%20AI%20Services&color=%230000ff&labelColor=%23000080&logo=huggingface&logoColor=%23ffa500&style=for-the-badge" alt="OpenFree badge">
|
| 164 |
+
</a>
|
| 165 |
|
| 166 |
+
<a href="https://discord.gg/openfreeai" target="_blank">
|
| 167 |
+
<img src="https://img.shields.io/static/v1?label=Discord&message=Openfree%20AI&color=%230000ff&labelColor=%23800080&logo=discord&logoColor=white&style=for-the-badge" alt="Discord badge">
|
| 168 |
+
</a>
|
| 169 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
"""
|
| 171 |
+
)
|
| 172 |
+
|
| 173 |
+
# ์ฌ๊ธฐ์ ์ถ๊ฐ Gradio ์ปดํฌ๋ํธ๋ค์ ๋ฃ์ ์ ์์ต๋๋ค
|
| 174 |
+
|
| 175 |
+
return demo
|
| 176 |
+
|
| 177 |
|
| 178 |
with gr.Row():
|
| 179 |
with gr.Column():
|