import gradio as gr from share_btn import community_icon_html, loading_icon_html, share_js block = gr.Blocks(css="./css.css") with block: with gr.Group(): with gr.Box(): with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True): text = gr.Dropdown( label="Star Sign", choices=["leo", "scorpio", "gemini"], show_label=False, max_lines=1, placeholder="Enter your prompt", elem_id="prompt-text-input", ).style( border=(True, False, True, True), rounded=(True, False, False, True), container=False, ) text2 = gr.Dropdown( choices=["love", "career", "wellness"], label="Category", show_label=False, max_lines=1, placeholder="Enter your prompt", elem_id="prompt-text-input", ).style( border=(True, True, True, True), rounded=(True, False, False, True), container=False, ) btn = gr.Button("Generate image").style( margin=False, rounded=(False, True, True, False), full_width=False, ) gallery = gr.Image( label="Generated images", show_label=False, elem_id="gallery" ).style(grid=[2], height="auto") with gr.Group(elem_id="container-advanced-btns"): with gr.Group(elem_id="share-btn-container"): community_icon = gr.HTML(community_icon_html) loading_icon = gr.HTML(loading_icon_html) share_button = gr.Button("Share to community", elem_id="share-btn") share_button.click( None, [], [], _js=share_js, ) gr.HTML( """