import numpy as np import time from fastapi import FastAPI from transformers import pipeline app = FastAPI() pipe = pipeline(model="mat27/medmnistPrueba") @app.get("/generate") def generate(example: np.array): output = pipe(example) print(output)