catheihei-api / main.py
Next7years
dafdsf
f7eff41
raw
history blame
367 Bytes
from fastapi import FastAPI
from diffusers import StableDiffusionPipeline
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World!"}
'''
@app.post("/generate")
def generate_image(input: str):
model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
return {"image": "hello from the server", "input": input}
'''