Spaces:
Runtime error
Runtime error
File size: 520 Bytes
98de6bd 29fafe3 7e8d5a0 f24acd7 98de6bd 4073f79 98de6bd 64a27af 5826980 f24acd7 64a27af 98de6bd 64a27af 4073f79 ff981ea 64a27af |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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) |