Spaces:
Runtime error
Runtime error
Commit ·
46be569
1
Parent(s): 06f120f
Update app.py
Browse files80 unmodified lines81828384848586873 unmodified lines91929394959495969767 unmodified lines16516616716916816917017180 unmodified lines
prodia_client = Prodia(api_key=os.getenv("PRODIA_API_KEY"))
def flip_text(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed, upscale):def flip_text(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed): result = prodia_client.generate({ "prompt": prompt, "negative_prompt": negative_prompt,3 unmodified lines "cfg_scale": cfg_scale, "width": width, "height": height, "seed": seed, "upscale": True "seed": seed })
job = prodia_client.wait(result)67 unmodified lines seed = gr.Number(label="Seed", value=-1, info = """'-1' is a random seed""")
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, sampler, width, height, cfg_scale, seed], outputs=image_output) text_button.click(flip_text, inputs=[prompt, negative_prompt, model, sampler, cfg_scale, width, heightseed], outputs=image_output) demo.queue(concurrency_count=10)demo.launch()app.py+3-4