testDall / app.py
GiladtheFixer's picture
Update app.py
6224e95
raw
history blame contribute delete
363 Bytes
from diffusers import StableDiffusionPipeline
import torch
import gradio as gr
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
def Gen(text):
image = pipe(prompt).images[0]
return image
demo = gr.Interface(
fn=Gen,
inputs='text',
outputs='image',
)
demo.launch()