mat27 commited on
Commit
6c69fdb
·
1 Parent(s): a7300fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
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}