Spaces:
Runtime error
Runtime error
Update app.py
Browse files22 unmodified lines2324252627282919 unmodified lines49505152535455565748 unmodified lines10610710810911011111222 unmodified lines# Inference function@spaces.GPU(duration=25)def generate_image(prompt, seed=42, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, randomize_seed=False, num_inference_steps=DEFAULT_INFERENCE_STEPS):if randomize_seed:seed = random.randint(0, MAX_SEED)19 unmodified lines"a tiny astronaut hatching from an egg on the moon","a cat holding a sign that says hello world","an anime illustration of a wiener schnitzel","a futuristic cityscape with flying cars and neon lights","Photo of a young woman with long, wavy brown hair tied in a bun and glasses. She has a fair complexion and is wearing subtle makeup, emphasizing her eyes and lips. She is dressed in a black top. The background appears to be an urban setting with a building facade, and the sunlight casts a warm glow on her face.","Imagine steve jobs as Star Wars movie character"]# --- Gradio UI ---48 unmodified lines)gr.on(triggers=[prompt.input, width.input, height.input, num_inference_steps.input],fn=generate_image,inputs=[prompt, seed, width, height, randomize_seed, num_inference_steps],outputs=[result, seed, latency],22 unmodified lines2324252627282919 unmodified lines49505152535455565748 unmodified lines10610710810911011111222 unmodified lines# Inference function@spaces.GPU(duration=25)def generate_image(prompt, seed=42, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, randomize_seed=False, num_inference_steps=2):if randomize_seed:seed = random.randint(0, MAX_SEED)19 unmodified lines"a tiny astronaut hatching from an egg on the moon","a cat holding a sign that says hello world","an anime illustration of a wiener schnitzel","a cute robot artist painting on an easel, concept art","Imagine steve jobs as Star Wars movie character","Photo of a young woman with long, wavy brown hair tied in a bun and glasses. She has a fair complexion and is wearing subtle makeup, emphasizing her eyes and lips. She is dressed in a black top. The background appears to be an urban setting with a building facade, and the sunlight casts a warm glow on her face.",]# --- Gradio UI ---48 unmodified lines)gr.on(triggers=[prompt.submit, prompt.input, width.input, height.input, num_inference_steps.input],fn=generate_image,inputs=[prompt, seed, width, height, randomize_seed, num_inference_steps],outputs=[result, seed, latency],
app.py+4-4