Spaces:
Runtime error
Runtime error
File size: 466 Bytes
298abc3 548acc4 298abc3 548acc4 298abc3 548acc4 298abc3 548acc4 298abc3 548acc4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from diffusers import DiffusionPipeline
# Cargar el modelo
pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5")
pipe.load_lora_weights("ovieyra21/yebama-sd15")
pipe.to('cuda')
def generate(prompt):
# Generar la imagen
image = pipe(prompt).images[0]
return image
# Crear la interfaz de Gradio
gr.Interface(
fn=generate,
inputs=gr.Textbox(label="Escribe tu prompt"),
outputs=gr.Image(type="pil"),
).launch()
|