Spaces:
Paused
Paused
Update app.py
Browse files9 unmodified lines101112131415161737 unmodified lines55565758596061626364656667686918 unmodified lines888990919293949 unmodified linessd_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]css = '''.animate-spin {37 unmodified lines"><h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;">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 linesshare_button = gr.Button("Share to community", elem_id="share-btn", visible=False)see_prompts.click(get_prompts,inputs = input_text,outputs = [text_output])9 unmodified lines101112131415161737 unmodified lines55565758596061626318 unmodified lines828384858687889 unmodified linessd_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(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 🎆</h1></div></div>""")with gr.Row():18 unmodified linesshare_button = gr.Button("Share to community", elem_id="share-btn", visible=False)see_prompts.click(get_prompts,inputs = [input_text],outputs = [text_output])
app.py+4-10