AIIA_docker / app.py
mat27's picture
Update app.py
fab135b
raw
history blame
315 Bytes
from fastapi import FastAPI
from transformers import pipeline
# Create a new FastAPI app instance
app = FastAPI()
pipe = pipeline("text2text-generation",
model="mat27/medmnistPrueba")
@app.get("/generate")
def generate(imagen: np.array):
output = pipe(imagen)
return {"Precisión: ": output}