Update app.py
Browse files
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={"
|
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"]
|