From 6705dcbc86ab4e261c84fb4a857b5fe6939444a1 Mon Sep 17 00:00:00 2001 From: OmarNasser213 Date: Wed, 27 Nov 2024 10:28:12 +0200 Subject: [PATCH] feat: edit endpoint --- app/src/Pages/Annotate.tsx | 2 +- object-detector/app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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']