Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,13 @@ from tensorflow import keras
|
|
| 7 |
from tensorflow.keras import layers
|
| 8 |
app = FastAPI()
|
| 9 |
|
|
|
|
| 10 |
model = from_pretrained_keras("mat27/medmnistPrueba")
|
| 11 |
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
|
|
|
|
| 12 |
|
|
|
|
| 13 |
@app.get("/generate")
|
| 14 |
def generate(example: np.array):
|
| 15 |
-
|
|
|
|
|
|
| 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):
|
| 18 |
+
output = pipe(example)
|
| 19 |
+
print(output)
|