catheihei-api / main.py
Next7years
set up
2579c7e
raw
history blame
295 Bytes
from fastapi import FastAPI
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": "test", "input": input}