Spaces:
Build error
Build error
import gradio as ui; from modules.engine_anime import * | |
feature = 'Text-to-Image - Anime' | |
''' | |
_____________________________________________________________________ | |
Copyright © 2023-2024 Ikmal Said. All rights reserved. | |
This program is the property of Ikmal Said. You may not reproduce | |
distribute, or modify this code without the express permission of | |
the author, Ikmal Said. | |
_____________________________________________________________________ | |
''' | |
with ui.Blocks(css=css, title=title(feature), theme=theme, analytics_enabled=False) as stella: | |
with ui.Group(): | |
result_anime = ui.Gallery(label=title(feature), object_fit="contain", height="43.4vh", show_share_button=False) | |
prompt_anime = ui.Textbox(show_label=False, show_copy_button=True, placeholder=spholder) | |
with ui.Row(): | |
clear_anime = ui.ClearButton(value="Reset", components=[result_anime, prompt_anime]) | |
submit_anime= ui.Button("Submit", variant="primary") | |
with ui.Accordion('Advanced', open=False): | |
style_anime = ui.Dropdown(label=sstyle, choices=list(stella_anime.keys()), value='None', filterable=False) | |
model_anime = ui.Dropdown(label=smodel, choices=list(ckpt_anime.keys()), value='Rev Animated', filterable=False) | |
ratio_anime = ui.Dropdown(label=sratio, choices=list(ratio.keys()), value='Square (1:1)', filterable=False) | |
quality_anime = ui.Dropdown(label=squality, choices=quality, value='Enhanced', filterable=False) | |
number_anime = ui.Dropdown(label=snumber, choices=[1,2,3,4], value=4, filterable=False) | |
process_anime = submit_anime.click(fn=quads_anime, inputs=[prompt_anime, model_anime, style_anime, ratio_anime, quality_anime, number_anime], outputs=[result_anime]) | |
prompt_anime.submit(fn=quads_anime, inputs=[prompt_anime, model_anime, style_anime, ratio_anime, quality_anime, number_anime], outputs=[result_anime]) | |
if __name__ == "__main__": | |
stella.queue(default_concurrency_limit=100, api_open=True).launch(inbrowser=True, favicon_path="favicon.ico") |