Spaces:
Paused
Paused
from fastapi import APIRouter, Form, BackgroundTasks | |
from config import settings | |
import os | |
import json | |
from routers.donut_evaluate import run_evaluate_donut | |
from routers.donut_training import run_training_donut | |
import utils | |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16) | |
router = APIRouter() | |
async def hifunction(): | |
prompt = "a photograph of an astronaut riding a horse" | |
image = pipe(prompt).images[0] | |
return [image] | |