Srastog commited on
Commit
15ec542
·
1 Parent(s): 9f7b5d5
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -4
app.py CHANGED
@@ -9,11 +9,11 @@ app=FastAPI(title="Alzheimer Detection API")
9
  def message():
10
  return "Welcome"
11
 
12
- @app.post("/predict")
13
  def predict(file: UploadFile):
14
  img=Image.open(file.file).convert("RGB")
15
  img=img.resize(480,480)
16
  img=np.array(img)
17
  model= get_alzheimer_model()
18
  label,probability=classify_img(model,img)
19
- return {"label":label.item(),"probability":probability.item()}
 
9
  def message():
10
  return "Welcome"
11
 
12
+ """@app.post("/predict")
13
  def predict(file: UploadFile):
14
  img=Image.open(file.file).convert("RGB")
15
  img=img.resize(480,480)
16
  img=np.array(img)
17
  model= get_alzheimer_model()
18
  label,probability=classify_img(model,img)
19
+ return {"label":label.item(),"probability":probability.item()}"""
requirements.txt CHANGED
@@ -1,9 +1,6 @@
1
  numpy==1.25.2
2
  torch==2.0.1
3
  fastapi==0.104.1
4
- uvicorn==0.24.0.post1
5
  python-multipart==0.0.6
6
  torchvision==0.15.2
7
- opencv-python-headless==4.5.4.60
8
- numpy==1.25.2
9
- streamlit==1.26.0
 
1
  numpy==1.25.2
2
  torch==2.0.1
3
  fastapi==0.104.1
4
+ uvicorn==0.24.0
5
  python-multipart==0.0.6
6
  torchvision==0.15.2