Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,14 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
# Create a new FastAPI app instance
|
5 |
app = FastAPI()
|
6 |
|
7 |
pipe = pipeline(model="mat27/medmnistPrueba")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from transformers import pipeline
|
3 |
+
import numpy as np
|
4 |
|
5 |
# Create a new FastAPI app instance
|
6 |
app = FastAPI()
|
7 |
|
8 |
pipe = pipeline(model="mat27/medmnistPrueba")
|
9 |
+
|
10 |
+
@app.get("/generate")
|
11 |
+
def generate(imagen: np.array):
|
12 |
+
output = pipe(imagen)
|
13 |
+
|
14 |
+
return {"output": output}
|