3mrology's picture
Update app.py
ff580f1
raw
history blame
702 Bytes
import gradio as gr
import torch
import gradio as gr
from PIL import Image
import qrcode
from pathlib import Path
from multiprocessing import cpu_count
import requests
import io
import os
from PIL import Image
from diffusers import (
DiffusionPipeline,
StableDiffusionPipeline,
StableDiffusionControlNetImg2ImgPipeline,
ControlNetModel,
DDIMScheduler,
DPMSolverMultistepScheduler,
DEISMultistepScheduler,
HeunDiscreteScheduler,
EulerDiscreteScheduler,
)
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
def generate(prompt):
return pipeline(prompt)
iface = gr.Interface(fn=generate, inputs="text", outputs="image")
iface.launch()