AIIA_docker / app.py
mat27's picture
Update app.py
7e8d5a0
raw
history blame
520 Bytes
import numpy as np
import time
from fastapi import FastAPI
from transformers import pipeline
from huggingface_hub import from_pretrained_keras
from tensorflow import keras
from tensorflow.keras import layers
app = FastAPI()
'''
model = from_pretrained_keras("mat27/medmnistPrueba")
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
'''
pipe = pipeline(model="mat27/medmnistPrueba")
@app.get("/generate")
def generate(example: np.array):
output = pipe(example)
print(output)