diffuser2 / main.py
beyonddata's picture
Upload folder using huggingface_hub
f8faa63
raw
history blame contribute delete
493 Bytes
from fastapi import FastAPI
import gradio as gr
import torch
from diffusers import DiffusionPipeline
import uvicorn
description = "Image generation with GPT-2"
title = "IMAGE GENERATION MACHINE"
pipeline3 = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_safetensors=False).to('cuda')
interface = gr.Interface(lambda x: pipeline3(x).images[0], 'textbox', 'image'
# description=description,
# examples=examples,
)
interface.launch(share = True)