Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,8 @@ import numpy as np
|
|
2 |
import time
|
3 |
from fastapi import FastAPI
|
4 |
from transformers import pipeline
|
5 |
-
from huggingface_hub import from_pretrained_keras
|
6 |
-
from tensorflow import keras
|
7 |
-
from tensorflow.keras import layers
|
8 |
app = FastAPI()
|
9 |
|
10 |
-
'''
|
11 |
-
model = from_pretrained_keras("mat27/medmnistPrueba")
|
12 |
-
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
|
13 |
-
'''
|
14 |
-
|
15 |
pipe = pipeline(model="mat27/medmnistPrueba")
|
16 |
@app.get("/generate")
|
17 |
def generate(example: np.array):
|
|
|
2 |
import time
|
3 |
from fastapi import FastAPI
|
4 |
from transformers import pipeline
|
|
|
|
|
|
|
5 |
app = FastAPI()
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
pipe = pipeline(model="mat27/medmnistPrueba")
|
8 |
@app.get("/generate")
|
9 |
def generate(example: np.array):
|