FIamenova commited on
Commit
79695a4
·
verified ·
1 Parent(s): f3438e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ def predict_image(image: Image.Image):
13
  byte_array = byte_array.getvalue()
14
 
15
  # Send the image to FastAPI service for prediction
16
- response = requests.post(FASTAPI_URL, files={"file": byte_array})
17
 
18
  if response.status_code == 200:
19
  return response.json()["prediction"]
 
13
  byte_array = byte_array.getvalue()
14
 
15
  # Send the image to FastAPI service for prediction
16
+ response = requests.post(FASTAPI_URL, files={"image": byte_array}) # Change 'file' to 'image'
17
 
18
  if response.status_code == 200:
19
  return response.json()["prediction"]