diff --git a/app/src/Pages/Annotate.tsx b/app/src/Pages/Annotate.tsx index 5709c83..0ad3063 100644 --- a/app/src/Pages/Annotate.tsx +++ b/app/src/Pages/Annotate.tsx @@ -33,7 +33,7 @@ const Annotate = () => { const blob = await fetch(selectedImage).then((res) => res.blob()); formData.append('image', blob); - const response = await fetch('http://127.0.0.1:5001/api/images/upload', { // Update the URL to match your backend + const response = await fetch('http://127.0.0.1:5001/predict', { // Update the URL to match your backend method: 'POST', body: formData, }); diff --git a/object-detector/app.py b/object-detector/app.py index 3685d88..bb845a9 100644 --- a/object-detector/app.py +++ b/object-detector/app.py @@ -23,7 +23,7 @@ image_predictions = {} -@app.route('/api/images/upload', methods=['POST']) +@app.route('/predict', methods=['POST']) def upload_image(): # Get the image from the request file = request.files['image']