Spaces:
Running on Zero
Running on Zero
Fix Gradio 6 kwargs for gr.Image and theme in app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,6 @@ try:
|
|
| 12 |
HAS_SPACES = True
|
| 13 |
except ImportError:
|
| 14 |
HAS_SPACES = False
|
| 15 |
-
# Mock spaces.GPU decorator for local execution without spaces installed
|
| 16 |
class spaces:
|
| 17 |
@staticmethod
|
| 18 |
def GPU(duration=60):
|
|
@@ -278,13 +277,9 @@ custom_css = """
|
|
| 278 |
color: #ffffff;
|
| 279 |
margin-right: 0.5rem;
|
| 280 |
}
|
| 281 |
-
.tag-btn {
|
| 282 |
-
margin-right: 0.25rem;
|
| 283 |
-
margin-bottom: 0.25rem;
|
| 284 |
-
}
|
| 285 |
"""
|
| 286 |
|
| 287 |
-
with gr.Blocks(title="Anima 2.9B - State of the Art Anime Diffusion"
|
| 288 |
with gr.Column(elem_classes=["container"]):
|
| 289 |
gr.HTML(
|
| 290 |
"""
|
|
@@ -351,7 +346,7 @@ with gr.Blocks(title="Anima 2.9B - State of the Art Anime Diffusion", css=custom
|
|
| 351 |
generate_btn = gr.Button("🚀 Generate Illustration", variant="primary", size="lg")
|
| 352 |
|
| 353 |
with gr.Column(scale=5):
|
| 354 |
-
image_output = gr.Image(label="Generated Image", type="pil", format="png"
|
| 355 |
status_output = gr.Markdown(value="*Click 'Generate Illustration' to create an artwork.*")
|
| 356 |
|
| 357 |
# Wire resolution selector
|
|
@@ -479,4 +474,4 @@ with gr.Blocks(title="Anima 2.9B - State of the Art Anime Diffusion", css=custom
|
|
| 479 |
)
|
| 480 |
|
| 481 |
if __name__ == "__main__":
|
| 482 |
-
demo.launch()
|
|
|
|
| 12 |
HAS_SPACES = True
|
| 13 |
except ImportError:
|
| 14 |
HAS_SPACES = False
|
|
|
|
| 15 |
class spaces:
|
| 16 |
@staticmethod
|
| 17 |
def GPU(duration=60):
|
|
|
|
| 277 |
color: #ffffff;
|
| 278 |
margin-right: 0.5rem;
|
| 279 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
"""
|
| 281 |
|
| 282 |
+
with gr.Blocks(title="Anima 2.9B - State of the Art Anime Diffusion") as demo:
|
| 283 |
with gr.Column(elem_classes=["container"]):
|
| 284 |
gr.HTML(
|
| 285 |
"""
|
|
|
|
| 346 |
generate_btn = gr.Button("🚀 Generate Illustration", variant="primary", size="lg")
|
| 347 |
|
| 348 |
with gr.Column(scale=5):
|
| 349 |
+
image_output = gr.Image(label="Generated Image", type="pil", format="png")
|
| 350 |
status_output = gr.Markdown(value="*Click 'Generate Illustration' to create an artwork.*")
|
| 351 |
|
| 352 |
# Wire resolution selector
|
|
|
|
| 474 |
)
|
| 475 |
|
| 476 |
if __name__ == "__main__":
|
| 477 |
+
demo.launch(theme=gr.themes.Soft(primary_hue="indigo", neutral_hue="slate"), css=custom_css)
|