Spaces:
Paused
Paused
Update app.py
Browse files9 unmodified lines1011121314131415161737 unmodified lines5556575858596061626364656661626318 unmodified lines82838491858687889 unmodified lines sd_output = [os.path.join(gallery_dir, image) for image in os.listdir(gallery_dir)] return sd_output, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
def get_prompts(uploaded_image): return text_gen(uploaded_image, fn_index=1)[0]def get_prompts(prompt_text): return text_gen(prompt_text, fn_index=1)[0]
css = '''.animate-spin {37 unmodified lines " > <h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;"> Stable Diffusion Magic Prompt 🎆🌌 Stable Diffusion Magic Prompt 🎆 </h1> </div> <p style="margin-bottom: 10px; font-size: 94%"> Sends an image in to <a href="https://huggingface.co/spaces/pharma/CLIP-Interrogator" target="_blank">CLIP Interrogator</a> to generate a text prompt which is then run through <a href="https://huggingface.co/spaces/stabilityai/stable-diffusion" target="_blank">Stable Diffusion</a> to generate new forms of the original! </p> </div>""")
with gr.Row():18 unmodified lines share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
see_prompts.click(get_prompts, inputs = input_text, inputs = [input_text], outputs = [ text_output ])app.py+4-10